]> git.mjollnir.org Git - moodle.git/commitdiff
Messages about missing functions in old and new upgrade are showed
authorstronk7 <stronk7>
Mon, 28 Aug 2006 15:47:45 +0000 (15:47 +0000)
committerstronk7 <stronk7>
Mon, 28 Aug 2006 15:47:45 +0000 (15:47 +0000)
only if the corresponding file exists.

lib/adminlib.php

index 3bc935827d6ad37c98c5f5cab47e33cad3067d40..3d7dbf4d65914da2de4973843e72bdd06c7a7722 100644 (file)
@@ -240,17 +240,17 @@ function upgrade_activity_modules($return) {
                 if ($oldupgrade && function_exists($oldupgrade_function)) {
                     $db->debug = true;
                     $oldupgrade_status = $oldupgrade_function($currmodule->version, $module);
-                } else {
+                } else if ($oldupgrade) {
                     notify ('Upgrade function ' . $oldupgrade_function . ' was not available in ' .
                              $mod . ': ' . $fullmod . '/db/' . $CFG->dbtype . '.php');
                 }
 
             /// Then, the new function if exists and the old one was ok
                 $newupgrade_status = true;
-                if ($newupgrade && function_exists($newupgrade_function) && $newupgrade_status) {
+                if ($newupgrade && function_exists($newupgrade_function) && $oldupgrade_status) {
                     $db->debug = true;
                     $newupgrade_status = $newupgrade_function($currmodule->version, $module);
-                } else {
+                } else if ($newupgrade) {
                     notify ('Upgrade function ' . $newupgrade_function . ' was not available in ' .
                              $mod . ': ' . $fullmod . '/db/upgrade.php');
                 }