MDL-52805 core: Remove legacy log plugin and more calls

This commit is contained in:
Mathew May
2023-03-07 13:08:46 +08:00
parent 5dace7abc8
commit 33ebbddde2
36 changed files with 39 additions and 2014 deletions
-11
View File
@@ -37,16 +37,5 @@ function xmldb_tool_log_install() {
$enabled[] = 'logstore_standard';
}
// Enable legacy log reading, but only if there are existing data.
if (file_exists("$CFG->dirroot/$CFG->admin/tool/log/store/legacy")) {
unset_config('loglegacy', 'logstore_legacy');
// Do not enabled legacy logging if somebody installed a new
// site and in less than one day upgraded to 2.7.
$params = array('yesterday' => time() - 60*60*24);
if ($DB->record_exists_select('log', "time < :yesterday", $params)) {
$enabled[] = 'logstore_legacy';
}
}
set_config('enabled_stores', implode(',', $enabled), 'tool_log');
}