You are here

function coder_upgrade_upgrade_admin_path_changes in Coder 7

Same name and namespace in other branches
  1. 7.2 coder_upgrade/conversions/regex.inc \coder_upgrade_upgrade_admin_path_changes()

Upgrades admin paths.

http://drupal.org/node/224333#admin_path_changes http://drupal.org/node/224333#clean_urls_search_paths

1 call to coder_upgrade_upgrade_admin_path_changes()
coder_upgrade_upgrade_regex_alter in coder_upgrade/conversions/regex.inc
Implements hook_upgrade_regex_alter().

File

coder_upgrade/conversions/regex.inc, line 104
Miscellaneous conversion routine file for the coder_upgrade module. These routines upgrade text using simple regular expressions.

Code

function coder_upgrade_upgrade_admin_path_changes(&$from, &$to) {
  $path_conversions = array(
    'admin/reports/settings' => 'admin/config/system/statistics',
    'admin/settings/filters' => 'admin/config/content/filter',
    'admin/build/modules' => 'admin/modules',
    'admin/build/themes' => 'admin/appearance',
    'admin/build/path' => 'admin/config/search/path',
    'admin/content/types' => 'admin/structure/types',
    'admin/content/taxonomy' => 'admin/structure/taxonomy',
    'admin/content/forum' => 'admin/structure/forum',
    'admin/build/testing' => 'admin/config/development/testing',
    'admin/settings/site-maintenance' => 'admin/config/development/maintenance',
    'admin/settings/performance' => 'admin/config/development/performance',
    'admin/settings/filters' => 'admin/config/content/formats',
    'admin/settings/search' => 'admin/config/search/settings',
    'admin/settings/clean-urls' => 'admin/config/search/clean-urls',
    'admin/settings/image' => 'admin/config/media/image',
    'admin/settings' => 'admin/config',
    'admin/build' => 'admin/structure',
  );
  foreach ($path_conversions as $old_path => $new_path) {
    $from[] = "@(['\"]){$old_path}(/?.*?)(['\"])@";
    $to[] = "\$1{$new_path}\$2\$1";
  }
}