No need to cache - this is done already in the Perms class.
public $version = 'H4 (1.0-git)';
/**
- * TODO
- */
- static protected $_perms = array();
-
- /**
* Returns a list of available permissions.
*
* @return array An array describing all available permissions.
*/
public function perms()
{
- if (!empty(self::$_perms)) {
- return self::$_perms;
- }
-
self::$_perms['tree']['agora']['admin'] = true;
self::$_perms['title']['agora:admin'] = _("Admin");
self::$_perms['title']['agora:forums'] = _("Forums");
self::$_perms['title']['agora:forums:' . $scope] = $GLOBALS['registry']->get('name', $scope);
self::$_perms['tree']['agora']['forums'][$scope] = false;
- $forums = &Agora_Messages::singleton($scope);
+ $forums = Agora_Messages::singleton($scope);
$forums_list = $forums->getBareForums();
if (($forums_list instanceof PEAR_Error) || empty($forums_list)) {
continue;
self::$_perms['tree']['agora']['forums'][$scope][$id] = false;
self::$_perms['title']['agora:forums:' . $scope . ':' . $id] = $title;
}
-
}
return self::$_perms;
{
global $registry;
- static $perms = array();
- if (!empty($perms)) {
- return $perms;
- }
-
$perms['tree']['babel']['language'] = array();
$perms['title']['babel:language'] = _("Languages");
$perms['type']['babel:language'] = 'none';
- foreach(Horde_Nls::$config['languages'] as $langcode => $langdesc) {
+ foreach($registry->nlsconfig['languages'] as $langcode => $langdesc) {
$perms['tree']['babel']['language'][$langcode] = false;
$perms['title']['babel:language:' . $langcode] = sprintf("%s (%s)", $langdesc, $langcode);
$perms['type']['babel:language:' . $langcode] = 'boolean';
*/
public function perms()
{
- static $perms = array();
+ $perms['title']['beatnik:domains'] = _("Domains");
- if (!empty($perms)) {
- return $perms;
- }
-
- require_once dirname(__FILE__) . '/base.php';
-
- $perms['title']['beatnik:domains'] = _("Domains");
-
- // Run through every domain
- foreach ($beatnik->driver->getDomains() as $domain) {
- $perms['tree']['beatnik']['domains'][$domain['zonename']] = false;
- $perms['title']['beatnik:domains:' . $domain['zonename']] = $domain['zonename'];
- }
+ // Run through every domain
+ foreach ($beatnik->driver->getDomains() as $domain) {
+ $perms['tree']['beatnik']['domains'][$domain['zonename']] = false;
+ $perms['title']['beatnik:domains:' . $domain['zonename']] = $domain['zonename'];
+ }
- return $perms;
+ return $perms;
}
/**
public $version = 'H4 (3.0-git)';
/**
- * Permissions cache.
- *
- * @var array
- */
- protected $_permsCache = array();
-
- /**
* Initialization function.
*
* Global variables defined:
*/
public function perms()
{
- if (!empty($this->_permsCache)) {
- return $this->_permsCache;
- }
-
$perms['tree']['chora']['sourceroots'] = false;
$perms['title']['chora:sourceroots'] = _("Repositories");
$perms['title']['chora:sourceroots:' . $sourceroot] = $srconfig['name'];
}
- $this->_permsCache = $perms;
-
return $perms;
}
*/
public function perms()
{
- if (!empty($this->_permsCache)) {
- return $this->_permsCache;
- }
-
$perms = array(
'tree' => array(
'gollem' => array(
static public $driver = null;
/**
- * TODO
- */
- static protected $_perms = array();
-
- /**
* Initialization function.
*
* Global variables defined:
*/
public function perms()
{
- if (!empty(self::$_perms)) {
- return self::$_perms;
- }
-
- self::$_perms = array();
- self::$_perms['tree']['hermes']['review'] = array();
- self::$_perms['title']['hermes:review'] = _("Time Review Screen");
- self::$_perms['tree']['hermes']['deliverables'] = array();
- self::$_perms['title']['hermes:deliverables'] = _("Deliverables");
- self::$_perms['tree']['hermes']['invoicing'] = array();
- self::$_perms['title']['hermes:invoicing'] = _("Invoicing");
-
- return self::$_perms;
+ $perms = array();
+ $perms['tree']['hermes']['review'] = array();
+ $perms['title']['hermes:review'] = _("Time Review Screen");
+ $perms['tree']['hermes']['deliverables'] = array();
+ $perms['title']['hermes:deliverables'] = _("Deliverables");
+ $perms['tree']['hermes']['invoicing'] = array();
+ $perms['title']['hermes:invoicing'] = _("Invoicing");
+
+ return $perms;
}
/* Sidebar method. */
*/
public function perms()
{
- static $perms = array();
- if (!empty($perms)) {
- return $perms;
- }
-
$perms['tree']['news']['admin'] = true;
$perms['title']['news:admin'] = _("Admin");
public $driver = null;
/**
- * TODO
- */
- static protected $_perms = array();
-
- /**
* Initialization function.
*
* Global variables defined:
*/
public function perms()
{
- if (!empty(self::$_perms)) {
- return self::$_perms;
- }
-
- self::$_perms['tree']['operator']['accountcodes'] = false;
- self::$_perms['title']['operator:accountcodes'] = _("Account Codes");
+ $perms['tree']['operator']['accountcodes'] = false;
+ $perms['title']['operator:accountcodes'] = _("Account Codes");
$accountcodes = Operator::getAccountCodes();
foreach ($accountcodes as $accountcode) {
- self::$_perms['tree']['operator']['accountcodes'][$accountcode] = false;
- self::$_perms['title']['operator:accountcodes:' . $accountcode] = $accountcode;
+ $perms['tree']['operator']['accountcodes'][$accountcode] = false;
+ $perms['title']['operator:accountcodes:' . $accountcode] = $accountcode;
}
- return self::$_perms;
+ return $perms;
}
}
public $vfs = null;
/**
- * TODO
- */
- static protected $_perms = array();
-
- /**
* Initialization function.
*
* Global variables defined:
*/
public function perms()
{
- if (!empty(self::$_perms)) {
- return self::$_perms;
- }
-
- self::$_perms['tree']['shout']['superadmin'] = false;
- self::$_perms['title']['shout:superadmin'] = _("Super Administrator");
+ $perms['tree']['shout']['superadmin'] = false;
+ $perms['title']['shout:superadmin'] = _("Super Administrator");
$accounts = $this->storage->getAccounts();
- self::$_perms['tree']['shout']['accounts'] = false;
- self::$_perms['title']['shout:accounts'] = _("Accounts");
+ $perms['tree']['shout']['accounts'] = false;
+ $perms['title']['shout:accounts'] = _("Accounts");
// Run through every contact source.
foreach ($accounts as $code => $info) {
- self::$_perms['tree']['shout']['accounts'][$code] = false;
- self::$_perms['title']['shout:accounts:' . $code] = $info['name'];
+ $perms['tree']['shout']['accounts'][$code] = false;
+ $perms['title']['shout:accounts:' . $code] = $info['name'];
foreach(
array(
'conferences' => 'Conference Rooms',
)
as $module => $modname) {
- self::$_perms['tree']['shout']['accounts'][$code][$module] = false;
- self::$_perms['title']["shout:accounts:$code:$module"] = $modname;
+ $perms['tree']['shout']['accounts'][$code][$module] = false;
+ $perms['title']["shout:accounts:$code:$module"] = $modname;
}
}
- return self::$_perms;
+ return $perms;
}
*/
public function perms()
{
- static $perms = array();
- if (!empty($perms)) {
- return $perms;
- }
-
require TURBA_BASE . '/config/sources.php';
$perms['tree']['turba']['sources'] = false;
class Vilma_Application extends Horde_Registry_Application
{
-
public $driver = null;
public $curdomain = null;
public function perms()
{
- static $perms = array();
- if (!empty($perms)) {
- return $perms;
- }
-
$perms['tree']['vilma']['superadmin'] = false;
$perms['title']['vilma:superadmin'] = _("Super Administrator");
return $perms;
}
-}
\ No newline at end of file
+}
}
/**
- * Permissions available from Whups
- *
- * @return array Permissions tree
- */
- public function perms()
- {
- }
-
- /**
* List cost objects
*
* @param array $criteria The list criteria
public $version = 'H4 (2.0-git)';
/**
- * Permissions cache
- *
- * @var array
- */
- protected $_permsCache = array();
-
- /**
* Whups initialization.
*
* Global variables defined:
*/
public function perms()
{
- if (!empty($this->_permsCache)) {
- return $this->_permsCache;
- }
-
/* Available Whups permissions. */
$perms['tree']['whups']['admin'] = false;
$perms['title']['whups:admin'] = _("Administration");
}
}
- $this->_permsCache = $perms;
-
return $perms;
}
public $version = 'H4 (2.0-git)';
/**
- * Permissions cache.
- *
- * @var array
- */
- protected $_permsCache = array();
-
- /**
* Wicked initialization.
*
* Global variables defined:
*/
public function perms()
{
- if (!empty($this->_permsCache)) {
- return $this->_permsCache;
- }
-
$perms['tree']['wicked']['pages'] = array();
$perms['title']['wicked:pages'] = _("Pages");
ksort($perms['tree']['wicked']['pages']);
}
- $this->_permsCache = $perms;
-
return $perms;
-
}
}