]> git.mjollnir.org Git - moodle.git/commitdiff
Unset rcache on UPDATE statements not using dmllib.php. MDL-14257 ; merged from 19_STABLE
authorstronk7 <stronk7>
Tue, 8 Apr 2008 23:17:20 +0000 (23:17 +0000)
committerstronk7 <stronk7>
Tue, 8 Apr 2008 23:17:20 +0000 (23:17 +0000)
lib/datalib.php

index 4105429e83dfa564bd5ec444159c1d7cd5ea8181..66876f50389bdb7431430395bed215ea8d1790b6 100644 (file)
@@ -1941,6 +1941,11 @@ function add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user
         if (!$res) {
             debugging('<p>Error: Could not insert a new entry to the Moodle log</p>');  // 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++;};