function coder_upgrade_convert_regex_simple_changes in Coder 7.2
Same name and namespace in other branches
- 7 coder_upgrade/conversions/other.inc \coder_upgrade_convert_regex_simple_changes()
Upgrades text using simple regular expressions.
System http://drupal.org/node/224333#moved_statistics_settings
Permissions and Access http://drupal.org/node/224333#moved_statistics_settings (DUP System) http://drupal.org/node/224333#php_permissions
Input Sanitization and Input Formats http://drupal.org/node/224333#filter_urls
Parameters
string $file: The text of the file to convert.
File
- coder_upgrade/
conversions/ other.inc, line 876 - Other conversion routine file for the coder_upgrade module.
Code
function coder_upgrade_convert_regex_simple_changes(&$file) {
$hook = 'regex_simple_changes';
$cur = $file;
$new = $cur;
$from = array();
$to = array();
// Moved admin/reports/settings to admin/config/system/statistics (replacing admin/settings/statistics).
$from[] = "@'admin/reports/settings'@";
$to[] = "'admin/config/system/statistics'";
// Replace "use PHP for block visibility" with "use PHP for settings."
$from[] = '/(\'|")use PHP for block visibility(\'|")/';
$to[] = "\$1use PHP for settings\$1";
// Moved admin/settings/filters/* to admin/settings/filter/*
$from[] = '@admin\\/settings\\/filters(\\/.*?)@';
$to[] = "admin\\/settings\\/filter\$1";
coder_upgrade_do_conversions($from, $to, $new);
coder_upgrade_save_changes($cur, $new, $file, $hook);
}