]> git.mjollnir.org Git - moodle.git/commitdiff
Added a comment to explain that add_to_log is the way it is for performance reasons.
authortjhunt <tjhunt>
Mon, 13 Mar 2006 10:37:21 +0000 (10:37 +0000)
committertjhunt <tjhunt>
Mon, 13 Mar 2006 10:37:21 +0000 (10:37 +0000)
lib/datalib.php

index f265cb090500f4a4997967972aa8b5db3297cabc..f53f7509547a3c7d10972a4e940e09c3cc0a0f2f 100644 (file)
@@ -2801,7 +2801,9 @@ function instance_is_visible($moduletype, $module) {
  * @param    string  $user    If log regards $user other than $USER
  */
 function add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user=0) {
-
+    // Note that this function intentionally does not follow the normal Moodle DB access idioms.
+    // 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 ($cm === '' || is_null($cm)) { // postgres won't translate empty string to its default