You are here

function coder_upgrade_save_changes in Coder 7.2

Same name and namespace in other branches
  1. 7 coder_upgrade/includes/main.inc \coder_upgrade_save_changes()

Saves the regular expression changes back to the file.

Parameters

string $cur: The string to search for in $file.

string $new: The replacement string.

string $file: The text being replaced (all of or part of a file).

string $hook: The hook being modified.

8 calls to coder_upgrade_save_changes()
coder_upgrade_convert_regex_simple_changes in coder_upgrade/conversions/other.inc
Upgrades text using simple regular expressions.
coder_upgrade_upgrade_regex_alter in coder_upgrade/conversions/regex.inc
Implements hook_upgrade_regex_alter().
coder_upgrade_upgrade_regex_info_alter in coder_upgrade/conversions/regex.inc
Implements hook_upgrade_regex_info_alter().
hook_upgrade_regex_alter in coder_upgrade/coder_upgrade.api.php
Alters the text of a code file using regular expressions.
hook_upgrade_regex_info_alter in coder_upgrade/coder_upgrade.api.php
Alters the text of an info file using regular expressions.

... See full list

File

coder_upgrade/includes/main.inc, line 677
Manages application of conversion routines, logging, and patch file creation.

Code

function coder_upgrade_save_changes($cur, $new, &$file, $hook) {
  if ($new != $cur) {
    $file = str_replace($cur, $new, $file);

    //    coder_upgrade_log_print('Completed conversions for ' . $hook);
  }
}