]> git.mjollnir.org Git - moodle.git/commitdiff
accesslib rework: Upgrade block to populate context.path and friends
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:42:42 +0000 (07:42 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:42:42 +0000 (07:42 +0000)
Note: this upgrade changes how accesslib works.

lib/db/upgrade.php
version.php

index 61527308b43a24c5574e687337eed6f89489c7af..cd1136aa0e748552151ef3d0408dd84f9eb09ac7 100644 (file)
@@ -2093,6 +2093,12 @@ function xmldb_main_upgrade($oldversion=0) {
         $result = $result && create_table($table);
     }
 
+    if ($result && $oldversion < 2007091900) {
+        cleanup_contexts();
+        build_context_path(true);
+        load_all_capabilities();
+    }
+
 
 /*
     /// drop old gradebook tables
index 2a86bd036e149d16cd24bdb2599ab4cdbe2362f5..5537e803a8e832e1216ce9241d7d8da3d932ba5e 100644 (file)
@@ -6,7 +6,7 @@
 // This is compared against the values stored in the database to determine
 // whether upgrades should be performed (see lib/db/*.php)
 
-    $version = 2007091800;  // YYYYMMDD = date
+    $version = 2007091900;  // YYYYMMDD = date
                             //       XY = increments within a single day
 
     $release = '1.9 Beta +';   // Human-friendly version name