]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-19350 upgrade blocks - tiding up minor bits in repo plugins
authorstronk7 <stronk7>
Wed, 3 Jun 2009 17:31:09 +0000 (17:31 +0000)
committerstronk7 <stronk7>
Wed, 3 Jun 2009 17:31:09 +0000 (17:31 +0000)
repository/local/db/upgrade.php
repository/upload/db/upgrade.php

index fcba47b24bf667261121f38adb5b38fb3f6d8bf2..d29c39a2184f9a496690cffcd35dff82c0e0ee1c 100644 (file)
@@ -1,9 +1,20 @@
 <?php
+
 function xmldb_repository_local_upgrade($oldversion) {
+
+    global $CFG, $DB;
+
+    $dbman = $DB->get_manager();
     $result = true;
-    /**
-    if ($result && $oldversion < 2009031000) {
-    } 
-    */
+
+/// And upgrade begins here. For each one, you'll need one
+/// block of code similar to the next one. Please, delete
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of database_manager methods
+/// }
+
     return $result;
 }
index d9bf4d30b13e8b868c36f9e180fe9eea4917cc40..9b61f8318d80e255e7d13dc1cc8e0f744726ea95 100644 (file)
@@ -1,9 +1,19 @@
 <?php
 function xmldb_repository_upload_upgrade($oldversion) {
+
+    global $CFG, $DB;
+
+    $dbman = $DB->get_manager();
     $result = true;
-    /**
-    if ($result && $oldversion < 2009031000) {
-    }
-    */
+
+/// And upgrade begins here. For each one, you'll need one
+/// block of code similar to the next one. Please, delete
+/// this comment lines once this file start handling proper
+/// upgrade code.
+
+/// if ($result && $oldversion < YYYYMMDD00) { //New version in version.php
+///     $result = result of database_manager methods
+/// }
+
     return $result;
 }