1 system.admin.inc | system_transliteration_file_query() |
Builds a query that returns all file names from the database containing non-ASCII characters.
Return value
File
- core/
modules/ system/ system.admin.inc, line 3171 - Admin page callbacks for the System module.
Code
function system_transliteration_file_query() {
$operator = 'NOT REGEXP';
if (config_get('system.core', 'file_transliterate_lowercase')) {
$operator .= ' BINARY';
}
$regex = '/[a-z0-9_.-]+$';
return db_select('file_managed')
->fields('file_managed')
->condition('uri', $regex, $operator);
}