Fix for bug MDL-6385

This commit is contained in:
vyshane
2006-08-29 02:09:31 +00:00
parent 7c72c2889a
commit 7b12414814
2 changed files with 13 additions and 17 deletions
+6 -8
View File
@@ -247,25 +247,23 @@ function forum_upgrade($oldversion) {
'for teacher forums will have to be manually set after '.
'this upgrade.');
}
foreach ($forums as $forum) {
if (!forum_convert_to_roles($forum, $forummod->id,
$studentroles, $guestroles)) {
notice('Forum with id '.$forum->id.' was not upgraded');
}
}
// Drop column forum.open.
modify_database('', 'ALTER TABLE prefix_forum DROP COLUMN open;');
// Drop column forum.assesspublic.
modify_database('', 'ALTER TABLE prefix_forum DROP COLUMN assesspublic;');
// We need to rebuild all the course caches to refresh the state of
// the forum modules.
rebuild_course_cache();
} // End if.
// Drop column forum.open.
modify_database('', 'ALTER TABLE prefix_forum DROP COLUMN open;');
// Drop column forum.assesspublic.
modify_database('', 'ALTER TABLE prefix_forum DROP COLUMN assesspublic;');
}
if ($oldversion < 2006082700) {
+7 -9
View File
@@ -237,25 +237,23 @@ function forum_upgrade($oldversion) {
'for teacher forums will have to be manually set after '.
'this upgrade.');
}
foreach ($forums as $forum) {
if (!forum_convert_to_roles($forum, $forummod->id,
$studentroles, $guestroles)) {
notice('Forum with id '.$forum->id.' was not upgraded');
}
}
// Drop column forum.open.
modify_database('', 'ALTER TABLE prefix_forum DROP COLUMN open;');
// Drop column forum.assesspublic.
modify_database('', 'ALTER TABLE prefix_forum DROP COLUMN assesspublic;');
// We need to rebuild all the course caches to refresh the state of
// the forum modules.
rebuild_course_cache();
} // End if.
// Drop column forum.open.
modify_database('', 'ALTER TABLE prefix_forum DROP COLUMN open;');
// Drop column forum.assesspublic.
modify_database('', 'ALTER TABLE prefix_forum DROP COLUMN assesspublic;');
}
if ($oldversion < 2006082700) {