From cb8aaedf61b6d5d7c3ebc609d1987f8dd8f8c30c Mon Sep 17 00:00:00 2001 From: stronk7 Date: Tue, 8 Apr 2008 23:17:20 +0000 Subject: [PATCH] Unset rcache on UPDATE statements not using dmllib.php. MDL-14257 ; merged from 19_STABLE --- lib/datalib.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/datalib.php b/lib/datalib.php index 4105429e83..66876f5038 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -1941,6 +1941,11 @@ function add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user if (!$res) { debugging('

Error: Could not insert a new entry to the Moodle log

'); // Don't throw an error } + /// Remove this record from record cache since it will change + if (!empty($CFG->rcache)) { + rcache_unset('user', $userid); + } + if ($courseid != SITEID && !empty($courseid)) { if (defined('MDL_PERFDB')) { global $PERF ; $PERF->dbqueries++;}; -- 2.39.5