From 6c7f537455d0ba6dca4bcf0426c55d5573190ee7 Mon Sep 17 00:00:00 2001 From: skodak Date: Sat, 4 Jul 2009 09:35:03 +0000 Subject: [PATCH] MDL-19689 adding IGNORE_MULTIPLE to get_record - please note this parameter is discouraged --- lib/moodlelib.php | 2 +- lib/weblib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 43387e0169..cd0eb8117f 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -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 } diff --git a/lib/weblib.php b/lib/weblib.php index 13c84092bf..6e40a59594 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -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) { -- 2.39.5