function _backup_migrate_clean_filename in Backup and Migrate 8.3
Same name and namespace in other branches
- 5.2 includes/files.inc \_backup_migrate_clean_filename()
- 5 backup_migrate.module \_backup_migrate_clean_filename()
- 6.3 includes/files.inc \_backup_migrate_clean_filename()
- 6 backup_migrate.module \_backup_migrate_clean_filename()
- 7.3 includes/files.inc \_backup_migrate_clean_filename()
Clean up a filename to remove unsafe characters.
2 calls to _backup_migrate_clean_filename()
- _backup_migrate_construct_filename in includes/
files.inc - Construct a filename using token and some cleaning.
- _backup_migrate_default_filename in includes/
files.inc - Construct a default filename using the site's name.
File
- includes/
files.inc, line 189 - General file handling code for Backup and Migrate.
Code
function _backup_migrate_clean_filename($filename) {
$filename = preg_replace("/[^a-zA-Z0-9\\.\\-_]/", "", $filename);
return $filename;
}