mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-19689 adding IGNORE_MULTIPLE to get_record - please note this parameter is discouraged
This commit is contained in:
parent
e6c6531cce
commit
6c7f537455
@ -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
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user