From: stronk7 <stronk7>
Date: Wed, 3 Jun 2009 17:31:09 +0000 (+0000)
Subject: MDL-19350 upgrade blocks - tiding up minor bits in repo plugins
X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6aa104ed961536d0cb78b4a1ee6f99d930226e0e;p=moodle.git

MDL-19350 upgrade blocks - tiding up minor bits in repo plugins
---

diff --git a/repository/local/db/upgrade.php b/repository/local/db/upgrade.php
index fcba47b24b..d29c39a218 100644
--- a/repository/local/db/upgrade.php
+++ b/repository/local/db/upgrade.php
@@ -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;
 }
diff --git a/repository/upload/db/upgrade.php b/repository/upload/db/upgrade.php
index d9bf4d30b1..9b61f8318d 100644
--- a/repository/upload/db/upgrade.php
+++ b/repository/upload/db/upgrade.php
@@ -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;
 }