]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19689 adding IGNORE_MULTIPLE to get_record - please note this parameter is discou...
authorskodak <skodak>
Sat, 4 Jul 2009 09:35:03 +0000 (09:35 +0000)
committerskodak <skodak>
Sat, 4 Jul 2009 09:35:03 +0000 (09:35 +0000)
lib/moodlelib.php
lib/weblib.php

index 43387e0169b937218d42610383f7cf9a7c8d2333..cd0eb8117fea7ae03a15b16bf2a7f23d1daf1be0 100644 (file)
@@ -929,7 +929,7 @@ function set_cache_flag($type, $name, $value, $expiry=NULL) {
         return true;
     }
 
-    if ($f = $DB->get_record('cache_flags', array('name'=>$name, 'flagtype'=>$type))) { // this is a potentail problem in DEBUG_DEVELOPER
+    if ($f = $DB->get_record('cache_flags', array('name'=>$name, 'flagtype'=>$type), '*', IGNORE_MULTIPLE)) { // this is a potentail problem in DEBUG_DEVELOPER
         if ($f->value == $value and $f->expiry == $expiry and $f->timemodified == $timemodified) {
             return true; //no need to update; helps rcache too
         }
index 13c84092bf12ff4fb3bf9543bc595dd3300fbd0b..6e40a59594f102a726536251fbc135695a34fa59 100644 (file)
@@ -1425,7 +1425,7 @@ function format_text($text, $format=FORMAT_MOODLE, $options=NULL, $courseid=NULL
             }
         }
 
-        if ($oldcacheitem = $DB->get_record('cache_text', array('md5key'=>$md5key), '*', true)) {
+        if ($oldcacheitem = $DB->get_record('cache_text', array('md5key'=>$md5key), '*', IGNORE_MULTIPLE)) {
             if ($oldcacheitem->timemodified >= $time) {
                 if (CLI_SCRIPT) {
                     if (count($croncache) > 150) {