From: stronk7 Date: Mon, 28 Aug 2006 15:47:45 +0000 (+0000) Subject: Messages about missing functions in old and new upgrade are showed X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ba05965e5c886010f2278c6c569db32548ab73a2;p=moodle.git Messages about missing functions in old and new upgrade are showed only if the corresponding file exists. --- diff --git a/lib/adminlib.php b/lib/adminlib.php index 3bc935827d..3d7dbf4d65 100644 --- a/lib/adminlib.php +++ b/lib/adminlib.php @@ -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'); }