Shout: Fix loading perms
authorBen Klang <ben@alkaloid.net>
Thu, 18 Mar 2010 02:32:00 +0000 (22:32 -0400)
committerBen Klang <ben@alkaloid.net>
Thu, 18 Mar 2010 02:32:22 +0000 (22:32 -0400)
shout/lib/Application.php
shout/lib/Shout.php

index 1fbef59..6aea6a5 100644 (file)
@@ -72,6 +72,10 @@ class Shout_Application extends Horde_Registry_Application
      */
     static protected $_perms = array();
 
+    public function __construct() {
+        print "Here!";
+    }
+
     /**
      * Initialization function.
      *
@@ -132,11 +136,7 @@ class Shout_Application extends Horde_Registry_Application
         self::$_perms['tree']['shout']['superadmin'] = false;
         self::$_perms['title']['shout:superadmin'] = _("Super Administrator");
 
-        if (empty($this->accounts)) {
-            $this->__construct(array('init' => true));
-        }
-
-        $accounts = $this->accounts->getAccounts();
+        $accounts = $this->storage->getAccounts();
 
         self::$_perms['tree']['shout']['accounts'] = false;
         self::$_perms['title']['shout:accounts'] = _("Accounts");
index b59251e..d671757 100644 (file)
@@ -139,7 +139,7 @@ class Shout
 
     static public function getMenuActions()
     {
-        global $shout;
+        $shout = $GLOBALS['registry']->getApiInstance('shout', 'application');
         $account = $_SESSION['shout']['curaccount'];
 
         return array(