From b810de6fd4afaed319c9a23cf03437ae88ba7b50 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Thu, 28 Jan 2010 10:30:09 -0700 Subject: [PATCH] Fix variable name --- chora/lib/Application.php | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/chora/lib/Application.php b/chora/lib/Application.php index 9adb41366..d29cfc8fd 100644 --- a/chora/lib/Application.php +++ b/chora/lib/Application.php @@ -41,9 +41,11 @@ class Chora_Application extends Horde_Registry_Application public $version = 'H4 (3.0-git)'; /** - * TODO + * Perms cache. + * + * @var array */ - static protected $perms = array(); + static protected $_permsCache = array(); /** * Initialization function. @@ -181,22 +183,24 @@ class Chora_Application extends Horde_Registry_Application */ public function perms() { - if (!empty(self::$_perms)) { - return self::$_perms; + if (!empty(self::$_permsCache)) { + return self::$_permsCache; } require_once dirname(__FILE__) . '/../config/sourceroots.php'; - self::$_perms['tree']['chora']['sourceroots'] = false; - self::$_perms['title']['chora:sourceroots'] = _("Repositories"); + $perms['tree']['chora']['sourceroots'] = false; + $perms['title']['chora:sourceroots'] = _("Repositories"); // Run through every source repository foreach ($sourceroots as $sourceroot => $srconfig) { - self::$_perms['tree']['chora']['sourceroots'][$sourceroot] = false; - self::$_perms['title']['chora:sourceroots:' . $sourceroot] = $srconfig['name']; + $perms['tree']['chora']['sourceroots'][$sourceroot] = false; + $perms['title']['chora:sourceroots:' . $sourceroot] = $srconfig['name']; } - return self::$_perms; + self::$_permsCache = $perms; + + return $perms; } /** -- 2.11.0