framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/AccessControlConfig.php
private function addACLEntry($role, $resourceType, $folderPath, $allowRulesMask, $denyRulesMask)
    {

        if (!strlen($folderPath)) {
            $folderPath = '/';
        }
        else {
            if (substr($folderPath,0,1) != '/') {
                $folderPath = '/' . $folderPath;
            }

            if (substr($folderPath,-1,1) != '/') {
                $folderPath .= '/';
            }
        }

        $_entryKey = $role . "#@#" . $resourceType;

        if (array_key_exists($folderPath,$this->_aclEntries)) {
            if (array_key_exists($_entryKey, $this->_aclEntries[$folderPath])) {
                $_rulesMasks = $this->_aclEntries[$folderPath][$_entryKey];
                foreach ($_rulesMasks[0] as $key => $value) {
                    $allowRulesMask[$key] |= $value;
                }
                foreach ($_rulesMasks[1] as $key => $value) {
                    $denyRulesMask[$key] |= $value;
                }
            }
        }
        else {
            $this->_aclEntries[$folderPath] = array();
        }

        $this->_aclEntries[$folderPath][$_entryKey] = array($allowRulesMask, $denyRulesMask);
    }
private function addACLEntry($role, $resourceType, $folderPath, $allowRulesMask, $denyRulesMask)
    {

        if (!strlen($folderPath)) {
            $folderPath = '/';
        }
        else {
            if (substr($folderPath,0,1) != '/') {
                $folderPath = '/' . $folderPath;
            }

            if (substr($folderPath,-1,1) != '/') {
                $folderPath .= '/';
            }
        }

        $_entryKey = $role . "#@#" . $resourceType;

        if (array_key_exists($folderPath,$this->_aclEntries)) {
            if (array_key_exists($_entryKey, $this->_aclEntries[$folderPath])) {
                $_rulesMasks = $this->_aclEntries[$folderPath][$_entryKey];
                foreach ($_rulesMasks[0] as $key => $value) {
                    $allowRulesMask[$key] |= $value;
                }
                foreach ($_rulesMasks[1] as $key => $value) {
                    $denyRulesMask[$key] |= $value;
                }
            }
        }
        else {
            $this->_aclEntries[$folderPath] = array();
        }

        $this->_aclEntries[$folderPath][$_entryKey] = array($allowRulesMask, $denyRulesMask);
    }
private function addACLEntry ( $ role , $ resourceType , $ folderPath , $ allowRulesMask , $ denyRulesMask ) { if ( ! strlen ( $ folderPath ) ) { $ folderPath = '/' ; } else { if ( substr ( $ folderPath , 0 , 1 ) != '/' ) { $ folderPath = '/' . $ folderPath ; } if ( substr ( $ folderPath , - 1 , 1 ) != '/' ) { $ folderPath .= '/' ; } } $ _entryKey = $ role . "#@#" . $ resourceType ; if ( array_key_exists ( $ folderPath , $ this -> _aclEntries ) ) { if ( array_key_exists ( $ _entryKey , $ this -> _aclEntries [ $ folderPath ] ) ) { $ _rulesMasks = $ this -> _aclEntries [ $ folderPath ] [ $ _entryKey ] ; foreach ( $ _rulesMasks [ 0 ] as $ key => $ value ) { $ allowRulesMask [ $ key ] |= $ value ; } foreach ( $ _rulesMasks [ 1 ] as $ key => $ value ) { $ denyRulesMask [ $ key ] |= $ value ; } } } else { $ this -> _aclEntries [ $ folderPath ] = array ( ) ; } $ this -> _aclEntries [ $ folderPath ] [ $ _entryKey ] = array ( $ allowRulesMask , $ denyRulesMask ) ; }
Add ACL entry

@param string $role role
@param string $resourceType resource type
@param string $folderPath folder path
@param int $allowRulesMask allow rules mask
@param int $denyRulesMask deny rules mask
@access private
Add ACL entry