Skip to content
Browse files

MDL-38541 Restrict calling rebuild_course_cache() from upgrade process

only plugins upgrade scripts can call rebuild_course_cache() and for clearing cache only.
  • Loading branch information...
marinaglancy committed Apr 9, 2013
1 parent 7d253e0 commit 1d05ecfd3e06e526d763a04db9a8ad06cabd7295
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/modinfolib.php
@@ -1279,6 +1279,12 @@ function get_fast_modinfo(&$course, $userid=0) {
function rebuild_course_cache($courseid=0, $clearonly=false) {
global $COURSE, $DB, $CFG;
if (!$clearonly && !empty($CFG->upgraderunning)) {
debugging('Function rebuild_course_cache() should not be called from upgrade script unless with argument clearonly.',
$clearonly = true;
// Destroy navigation caches

0 comments on commit 1d05ecf

Please sign in to comment.
You can’t perform that action at this time.