]> git.mjollnir.org Git - moodle.git/commitdiff
Only launch the old upgrade if it exists. It doesn'texist for new DB
authorstronk7 <stronk7>
Sat, 2 Sep 2006 23:40:13 +0000 (23:40 +0000)
committerstronk7 <stronk7>
Sat, 2 Sep 2006 23:40:13 +0000 (23:40 +0000)
flavours and modules.

admin/index.php

index a458a9a88e9f523a7a4a1db9713a0903ee8a8ed9..870f1c634067752aa2576f5d72c1c1e967f2cc43 100644 (file)
                 upgrade_log_start();
                 print_heading($strdatabasechecking);
                 $db->debug=true;
-            /// Launch the old main upgrade
-                $status = main_upgrade($CFG->version);
+            /// Launch the old main upgrade (if exists)
+                $status = true;
+                if (function_exists('main_upgrade')) {
+                    $status = main_upgrade($CFG->version);
+                }
             /// If succesful and exists launch the new main upgrade (XMLDB), called xmldb_main_upgrade
                 if ($status && function_exists('xmldb_main_upgrade')) {
                     $status = xmldb_main_upgrade($CFG->version);