]> git.mjollnir.org Git - moodle.git/commitdiff
Minor separations...
authorstronk7 <stronk7>
Wed, 30 Aug 2006 20:13:46 +0000 (20:13 +0000)
committerstronk7 <stronk7>
Wed, 30 Aug 2006 20:13:46 +0000 (20:13 +0000)
lib/adminlib.php

index 1faebaf01e067be1ff201de0542b60323e4e38a8..8c88e534cf77e16190ff4abe0a7edfc7aa32b5ae 100644 (file)
@@ -43,12 +43,12 @@ function upgrade_plugins($type, $dir, $return) {
 
         $oldupgrade = false;
         $newupgrade = false;
-        if (is_readable($fullplug .'/db/'. $CFG->dbtype .'.php')) {
-            include_once($fullplug .'/db/'. $CFG->dbtype .'.php');  // defines old upgrading function
+        if (is_readable($fullplug . '/db/'. $CFG->dbtype . '.php')) {
+            include_once($fullplug . '/db/'. $CFG->dbtype . '.php');  // defines old upgrading function
             $oldupgrade = true;
         }
-        if (is_readable($fullplug .'/db/upgrade.php')  && $CFG->xmldb_enabled) {
-            include_once($fullplug .'/db/upgrade.php');  // defines new upgrading function
+        if (is_readable($fullplug . '/db/upgrade.php')  && $CFG->xmldb_enabled) {
+            include_once($fullplug . '/db/upgrade.php');  // defines new upgrading function
             $newupgrade = true;
         }
 
@@ -109,9 +109,8 @@ function upgrade_plugins($type, $dir, $return) {
                     $status = install_from_xmldb_file($fullplug . '/db/installl.xml'); //New method
                 } else if (file_exists($fullplug .'/db/'. $CFG->dbtype .'.sql')) {
                     $status = modify_database($fullplug .'/db/'. $CFG->dbtype .'.sql'); //Old method
-                } else {    // We'll assume no tables are necessary
-                    set_config($pluginversion, $plugin->version);
-                    notify(get_string('modulesuccess', '', $plugin->name), 'notifysuccess');
+                } else { 
+                    $status = true;
                 }
 
                 $db->debug = false;
@@ -217,12 +216,12 @@ function upgrade_activity_modules($return) {
 
         $oldupgrade = false;
         $newupgrade = false;
-        if ( is_readable($fullmod .'/db/'. $CFG->dbtype .'.php')) {
-            include_once($fullmod .'/db/'. $CFG->dbtype .'.php');  // defines old upgrading function
+        if ( is_readable($fullmod .'/db/' . $CFG->dbtype . '.php')) {
+            include_once($fullmod .'/db/' . $CFG->dbtype . '.php');  // defines old upgrading function
             $oldupgrade = true;
         }
-        if ( is_readable($fullmod .'/db/upgrade.php') && $CFG->xmldb_enabled) {
-            include_once($fullmod .'/db/upgrade.php');  // defines new upgrading function
+        if ( is_readable($fullmod . '/db/upgrade.php') && $CFG->xmldb_enabled) {
+            include_once($fullmod . '/db/upgrade.php');  // defines new upgrading function
             $newupgrade = true;
         }