diff --git a/admin/tool/replace/index.php b/admin/tool/replace/index.php index 11e1068576b..67d945ee427 100644 --- a/admin/tool/replace/index.php +++ b/admin/tool/replace/index.php @@ -49,6 +49,7 @@ if ($DB->get_dbfamily() !== 'mysql' and $DB->get_dbfamily() !== 'postgres') { if (!data_submitted() or !$search or !$replace or !confirm_sesskey() or !$sure) { /// Print a form echo $OUTPUT->notification(get_string('notsupported', 'tool_replace')); + echo $OUTPUT->notification(get_string('excludedtables', 'tool_replace')); echo $OUTPUT->box_start(); echo '
'; diff --git a/admin/tool/replace/lang/en/tool_replace.php b/admin/tool/replace/lang/en/tool_replace.php index 2193805f13e..9103e890ebc 100644 --- a/admin/tool/replace/lang/en/tool_replace.php +++ b/admin/tool/replace/lang/en/tool_replace.php @@ -24,6 +24,7 @@ */ $string['disclaimer'] = 'I understand the risks of this operation:'; +$string['excludedtables'] = 'Several tables are not updated as part of the text replacement. This include configuration, log, events, and session tables.'; $string['pageheader'] = 'Search and replace text throughout the whole database'; $string['notifyfinished'] = '...finished'; $string['notifyrebuilding'] = 'Rebuilding course cache...'; @@ -33,4 +34,4 @@ $string['pluginname'] = 'DB search and replace'; $string['replacewith'] = 'Replace with this string:'; $string['replacewithhelp'] = 'usually new server URL'; $string['searchwholedb'] = 'Search whole database for:'; -$string['searchwholedbhelp'] = 'usually previous server URL'; \ No newline at end of file +$string['searchwholedbhelp'] = 'usually previous server URL'; diff --git a/lib/adminlib.php b/lib/adminlib.php index fe4dc93a7c0..178244558bc 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -6668,7 +6668,7 @@ function db_replace($search, $replace) { global $DB, $CFG, $OUTPUT; // TODO: this is horrible hack, we should do whitelisting and each plugin should be responsible for proper replacing... - $skiptables = array('config', 'config_plugins', 'config_log', 'upgrade_log', + $skiptables = array('config', 'config_plugins', 'config_log', 'upgrade_log', 'log', 'filter_config', 'sessions', 'events_queue', 'repository_instance_config', 'block_instances', '');