]> git.mjollnir.org Git - moodle.git/commitdiff
Correct misleading error message in upgrade_activity_modules. Spotted while diagnosin...
authortjhunt <tjhunt>
Sat, 13 Oct 2007 22:00:55 +0000 (22:00 +0000)
committertjhunt <tjhunt>
Sat, 13 Oct 2007 22:00:55 +0000 (22:00 +0000)
lib/adminlib.php

index 789732a78fb54e313d8165cdcd6f7c23f23e22d4..46af0f5b45f74b5cd17e8ee4c9b6232ed5cefcee 100644 (file)
@@ -322,6 +322,10 @@ function upgrade_activity_modules($return) {
                 if ($oldupgrade && function_exists($oldupgrade_function)) {
                     $db->debug = true;
                     $oldupgrade_status = $oldupgrade_function($currmodule->version, $module);
+                    if (!$oldupgrade_status) {
+                        notify ('Upgrade function ' . $oldupgrade_function .
+                                ' did not complete successfully.'); 
+                    }
                 } else if ($oldupgrade) {
                     notify ('Upgrade function ' . $oldupgrade_function . ' was not available in ' .
                              $mod . ': ' . $fullmod . '/db/' . $CFG->dbtype . '.php');
@@ -332,7 +336,7 @@ function upgrade_activity_modules($return) {
                 if ($newupgrade && function_exists($newupgrade_function) && $oldupgrade_status) {
                     $db->debug = true;
                     $newupgrade_status = $newupgrade_function($currmodule->version, $module);
-                } else if ($newupgrade) {
+                } else if ($newupgrade && $oldupgrade_status) {
                     notify ('Upgrade function ' . $newupgrade_function . ' was not available in ' .
                              $mod . ': ' . $fullmod . '/db/upgrade.php');
                 }