MDL-37658 logging: fixed bug in legacy logging

This commit is contained in:
Marina Glancy 2014-01-14 18:14:06 +08:00 committed by Petr Škoda
parent 7eaca5a810
commit 53dd210aff
2 changed files with 3 additions and 4 deletions

View File

@ -159,8 +159,8 @@ class manager implements \core\log\manager {
*/
public function legacy_add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user=0) {
$this->init();
if (isset($this->stores['legacy'])) {
$this->stores['legacy']->legacy_add_to_log($courseid, $module, $action, $url, $info, $cm, $user);
if (isset($this->stores['logstore_legacy'])) {
$this->stores['logstore_legacy']->legacy_add_to_log($courseid, $module, $action, $url, $info, $cm, $user);
}
}
}

View File

@ -104,8 +104,7 @@ class store implements \tool_log\log\store, \core\log\reader {
// This is for a good reason: it is the most frequently used DB update function,
// so it has been optimised for speed.
global $DB, $CFG, $USER;
if ($this->legacy_logging_enabled()) {
if (!$this->legacy_logging_enabled()) {
return;
}