Permalink
Browse files

MDL-33915 - prevent use of rebuild_course_cache during upgrade

It depends on upgrade changes itself
  • Loading branch information...
danpoltawski committed Jun 21, 2012
1 parent 334de6b commit 026082b401450f66ef7ac3aacf85b106059397c6
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/db/upgrade.php
View
@@ -385,7 +385,9 @@ function xmldb_main_upgrade($oldversion) {
AND older.id < cs.id');
foreach ($rs as $rec) {
$DB->delete_records('course_sections', array('id' => $rec->id));
rebuild_course_cache($rec->course, true);
// We can't use rebuild_course_cache() here because introducing sectioncache later
// so reset modinfo manually.
$DB->set_field('course', 'modinfo', null, array('id' => $rec->course));
}
$rs->close();
$transaction->allow_commit();

0 comments on commit 026082b

Please sign in to comment.