Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
334de6b
)
MDL-33915 - prevent use of rebuild_course_cache during upgrade
author
Dan Poltawski
<dan@moodle.com>
Thu, 21 Jun 2012 02:49:17 +0000
(10:49 +0800)
committer
Dan Poltawski
<dan@moodle.com>
Thu, 21 Jun 2012 03:43:54 +0000
(11:43 +0800)
It depends on upgrade changes itself
lib/db/upgrade.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/db/upgrade.php
b/lib/db/upgrade.php
index
09f3896
..
931c044
100644
(file)
--- a/
lib/db/upgrade.php
+++ b/
lib/db/upgrade.php
@@
-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();