From: Ben Klang Date: Thu, 18 Mar 2010 02:32:00 +0000 (-0400) Subject: Shout: Fix loading perms X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=8dbe9af7905ce45c2f0a959c031e3b2baafba37b;p=horde.git Shout: Fix loading perms --- diff --git a/shout/lib/Application.php b/shout/lib/Application.php index 1fbef59d9..6aea6a58e 100644 --- a/shout/lib/Application.php +++ b/shout/lib/Application.php @@ -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"); diff --git a/shout/lib/Shout.php b/shout/lib/Shout.php index b59251eb3..d671757df 100644 --- a/shout/lib/Shout.php +++ b/shout/lib/Shout.php @@ -139,7 +139,7 @@ class Shout static public function getMenuActions() { - global $shout; + $shout = $GLOBALS['registry']->getApiInstance('shout', 'application'); $account = $_SESSION['shout']['curaccount']; return array(