From: vyshane Date: Tue, 29 Aug 2006 02:09:31 +0000 (+0000) Subject: Fix for bug MDL-6385 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7b12414814bfe1b83d2e7b22f9f189b9d83e365d;p=moodle.git Fix for bug MDL-6385 --- diff --git a/mod/forum/db/mysql.php b/mod/forum/db/mysql.php index 6cd2a9f606..a1d890df73 100644 --- a/mod/forum/db/mysql.php +++ b/mod/forum/db/mysql.php @@ -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) { diff --git a/mod/forum/db/postgres7.php b/mod/forum/db/postgres7.php index d3c3bea5fb..204d139fd1 100644 --- a/mod/forum/db/postgres7.php +++ b/mod/forum/db/postgres7.php @@ -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) {