Skip to content

Commit

Permalink
MDL-19689 adding IGNORE_MULTIPLE to get_record - please note this par…
Browse files Browse the repository at this point in the history
…ameter is discouraged
  • Loading branch information
skodak committed Jul 4, 2009
1 parent e6c6531 commit 6c7f537
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/moodlelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion lib/weblib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6c7f537

Please sign in to comment.