MDL-36171 Administration Skip replace in the log table

This commit is contained in:
Andrew Robert Nicols 2012-10-23 16:05:24 +08:00
parent cce0d9a100
commit 08b196e265
3 changed files with 4 additions and 2 deletions

View File

@ -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 '<div class="mdl-align">';

View File

@ -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';
$string['searchwholedbhelp'] = 'usually previous server URL';

View File

@ -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', '');