### Eclipse Workspace Patch 1.0 #P drupal_5 Index: sites/all/modules/transliteration/transliteration.install =================================================================== --- sites/all/modules/transliteration/transliteration.install (revision 903) +++ sites/all/modules/transliteration/transliteration.install (working copy) @@ -61,12 +61,22 @@ case 'pgsql': $op = '~*'; break; + case 'mssql': + $op = 'LIKE'; + break; } // Get all of the files that need to be converted, that is those that // contain characters other than alphanumerics, underscores, dots, or // hyphens. - $result = db_query("SELECT fid, filepath FROM {files} WHERE SUBSTRING_INDEX(filepath, '/', -1) $op '[^0-9A-Za-z_.-]'"); + switch ($GLOBALS['db_type']) { + case 'mysql': + case 'mysqli': + $result = db_query("SELECT fid, filepath FROM {files} WHERE SUBSTRING_INDEX(filepath, '/', -1) $op '[^0-9A-Za-z_.-]'"); + case 'mssql': + $result = db_query("SELECT fid, filepath FROM {files} WHERE filepath $op '%[^0-9A-Za-z_.-]%'"); + break; + } $errors = array(); while ($file = db_fetch_object($result)) {