[Jaws-commits] r9706 - trunk/jaws/html/include/Jaws

afz at jaws-project.com afz at jaws-project.com
Sun Oct 19 04:19:59 UTC 2008


Author: afz
Date: 2008-10-19 04:19:59 +0000 (Sun, 19 Oct 2008)
New Revision: 9706

Modified:
   trunk/jaws/html/include/Jaws/Gadget.php
Log:
fix issue that upgrade can't update core changes

Modified: trunk/jaws/html/include/Jaws/Gadget.php
===================================================================
--- trunk/jaws/html/include/Jaws/Gadget.php	2008-10-19 04:15:46 UTC (rev 9705)
+++ trunk/jaws/html/include/Jaws/Gadget.php	2008-10-19 04:19:59 UTC (rev 9706)
@@ -669,6 +669,19 @@
             return $instance;
         }
 
+        if (!$instance) {
+            return false;
+        }
+
+        if (is_string($instance)) {
+            //Instance has the new version number
+            $GLOBALS['app']->Registry->Set('version', $instance, $gadget);
+        } else {
+            //Use the latest (current) version
+            $GLOBALS['app']->Registry->Set('version', $newVersion, $gadget);
+        }
+
+        // commit acl and registry keys
         if (isset($GLOBALS['app']->ACL)) {
             $GLOBALS['app']->ACL->Commit($gadget);
         }
@@ -704,18 +717,9 @@
             $GLOBALS['app']->Registry->Set('autoload_gadgets', $data);
         }
 
-        if ($instance === false) {
-            return false;
-        }
+        // Commit all the recent core changes
+        $GLOBALS['app']->Registry->Commit('core');
 
-        if (is_string($instance)) {
-            //Instance has the new version number
-            $GLOBALS['app']->Registry->Set('version', $instance, $gadget);
-        } else {
-            //Use the latest (current) version
-            $GLOBALS['app']->Registry->Set('version', $newVersion, $gadget);
-        }
-
         $GLOBALS['app']->Map->CreateMapFile();
         // After anything finished
         $res = $GLOBALS['app']->Shouter->Shout('onAfterUpdatingGadget', $gadget);



More information about the Jaws-commits mailing list