framework/Mvc/Extensions/Ckfinder/lib/core/connector/php/php5/Core/AccessControlConfig.php
private function mergePathComputedMask( $currentMask, $resourceType, $userRole, $path )
    {
        $_folderEntries = $this->_aclEntries[$path];

        $_possibleEntries = array();

        $_possibleEntries[0] = "*#@#*";
        $_possibleEntries[1] = "*#@#" . $resourceType;

        if (!is_null($userRole))
        {
            $_possibleEntries[2] = $userRole . "#@#*";
            $_possibleEntries[3] = $userRole . "#@#" . $resourceType;
        }

        for ($r = 0; $r < sizeof($_possibleEntries); $r++)
        {
            $_possibleKey = $_possibleEntries[$r];
            if (array_key_exists($_possibleKey, $_folderEntries))
            {
                $_rulesMasks = $_folderEntries[$_possibleKey];

                $currentMask |= array_sum($_rulesMasks[0]);
                $currentMask ^= ($currentMask & array_sum($_rulesMasks[1]));
            }
        }

        return $currentMask;
    }
private function mergePathComputedMask( $currentMask, $resourceType, $userRole, $path )
    {
        $_folderEntries = $this->_aclEntries[$path];

        $_possibleEntries = array();

        $_possibleEntries[0] = "*#@#*";
        $_possibleEntries[1] = "*#@#" . $resourceType;

        if (!is_null($userRole))
        {
            $_possibleEntries[2] = $userRole . "#@#*";
            $_possibleEntries[3] = $userRole . "#@#" . $resourceType;
        }

        for ($r = 0; $r < sizeof($_possibleEntries); $r++)
        {
            $_possibleKey = $_possibleEntries[$r];
            if (array_key_exists($_possibleKey, $_folderEntries))
            {
                $_rulesMasks = $_folderEntries[$_possibleKey];

                $currentMask |= array_sum($_rulesMasks[0]);
                $currentMask ^= ($currentMask & array_sum($_rulesMasks[1]));
            }
        }

        return $currentMask;
    }
private function mergePathComputedMask ( $ currentMask , $ resourceType , $ userRole , $ path ) { $ _folderEntries = $ this -> _aclEntries [ $ path ] ; $ _possibleEntries = array ( ) ; $ _possibleEntries [ 0 ] = "*#@#*" ; $ _possibleEntries [ 1 ] = "*#@#" . $ resourceType ; if ( ! is_null ( $ userRole ) ) { $ _possibleEntries [ 2 ] = $ userRole . "#@#*" ; $ _possibleEntries [ 3 ] = $ userRole . "#@#" . $ resourceType ; } for ( $ r = 0 ; $ r < sizeof ( $ _possibleEntries ) ; $ r ++ ) { $ _possibleKey = $ _possibleEntries [ $ r ] ; if ( array_key_exists ( $ _possibleKey , $ _folderEntries ) ) { $ _rulesMasks = $ _folderEntries [ $ _possibleKey ] ; $ currentMask |= array_sum ( $ _rulesMasks [ 0 ] ) ; $ currentMask ^= ( $ currentMask & array_sum ( $ _rulesMasks [ 1 ] ) ) ; } } return $ currentMask ; }
merge current mask with folder entries

@access private
@param int $currentMask
@param string $resourceType
@param string $userRole
@param string $path
@return int
merge current mask with folder entries