]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-16072 fixed pg problem
authorskodak <skodak>
Mon, 18 Aug 2008 22:31:47 +0000 (22:31 +0000)
committerskodak <skodak>
Mon, 18 Aug 2008 22:31:47 +0000 (22:31 +0000)
mod/forum/db/upgrade.php
mod/forum/version.php

index c4d26491b48c8ab9a9d7adfef7b12660d076ff78..6768346dab3433604c60abd9bb56c018a6e70a8e 100644 (file)
@@ -110,12 +110,11 @@ function xmldb_forum_upgrade($oldversion) {
                     JOIN {forum} f ON f.id = d.forum
                     JOIN {modules} m ON m.name = 'forum'
                     JOIN {course_modules} cm ON (cm.module = m.id AND cm.instance = f.id)
-                   WHERE p.attachment <> '$empty' AND p.attachment <> '1'
-                ORDER BY f.course, f.id, d.id";
+                   WHERE p.attachment <> '$empty' AND p.attachment <> '1'";
 
         $count = $DB->count_records_sql("SELECT COUNT('x') $sqlfrom");
 
-        if ($rs = $DB->get_recordset_sql("SELECT p.id, p.attachment, d.forum, f.course, cm.id AS cmid $sqlfrom")) {
+        if ($rs = $DB->get_recordset_sql("SELECT p.id, p.attachment, d.forum, f.course, cm.id AS cmid $sqlfrom ORDER BY f.course, f.id, d.id")) {
 
             $pbar = new progress_bar('migrateforumfiles', 500, true);
 
index ff857c550f9323c5cdf25ee49d7be6bb07d5466d..0503f290e7121a329c1adeeed62ad9a91fb60711 100644 (file)
@@ -5,7 +5,7 @@
 //  This fragment is called by /admin/index.php
 ////////////////////////////////////////////////////////////////////////////////
 
-$module->version  = 2008081800;
+$module->version  = 2008081900;
 $module->requires = 2008081600;  // Requires this Moodle version
 $module->cron     = 60;