<?php /** * @version $Id: acl.php 668 2008-06-12 15:08:15Z snipersister $ * @package Easybook * @link http://www.easy-joomla.org * @license GNU/GPL */ acl_helper::$ebconfig =& $mainframe->getParams(); acl_helper::$acl_hack = true; acl_helper::$acl =& JFactory::getACL(); acl_helper::setACLs(); class acl_helper { static $ebconfig; static $acl; static $acl_hack; static function getChilds($gid) { static $hack_cache; static $cache; if (!isset($cache)) { $tmp = self::$acl->get_group_children("30", "ARO", "RECURSE"); $cache = array("30" => $tmp); $hack_cache = array_merge(array("30"), $tmp); } if (!array_key_exists($gid, $cache)) { $tmp = self::$acl->get_group_children($gid, "ARO", "RECURSE"); if (self::$acl_hack && in_array(21, $tmp)) { $tmp = array_merge($tmp, $hack_cache); }
<?php /** * @version $Id: acl-php4.php 668 2008-06-12 15:08:15Z snipersister $ * @package Easybook * @link http://www.easy-joomla.org * @license GNU/GPL */ $acl_hlp_inst = new acl_helper(); $acl_hlp_inst->ebconfig =& $mainframe->getParams(); $acl_hlp_inst->acl_hack = true; $acl_hlp_inst->acl =& JFactory::getACL(); $acl_hlp_inst->setACLs(); class acl_helper { var $ebconfig; var $acl; var $acl_hack; function getChilds($gid) { static $hack_cache; static $cache; if (!isset($cache)) { $tmp = $this->acl->get_group_children("30", "ARO", "RECURSE"); $cache = array("30" => $tmp); $hack_cache = array_merge(array("30"), $tmp); } if (!array_key_exists($gid, $cache)) { $tmp = $this->acl->get_group_children($gid, "ARO", "RECURSE"); if ($this->acl_hack && in_array(21, $tmp)) { $tmp = array_merge($tmp, $hack_cache);