From 8dbe9af7905ce45c2f0a959c031e3b2baafba37b Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Wed, 17 Mar 2010 22:32:00 -0400 Subject: [PATCH] Shout: Fix loading perms --- shout/lib/Application.php | 10 +++++----- shout/lib/Shout.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) 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( -- 2.11.0