Changeset 10005

Show
Ignore:
Timestamp:
11/23/08 14:11:00 (2 months ago)
Author:
afz
Message:

revert wrong commit

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/0.8/jaws/html/include/Jaws/ACL.php

    r9989 r10005  
    77 * @author     Ivan Chavero <imcsk8@gluch.org.mx> 
    88 * @author     Jonathan Hernandez <ion@suavizado.com> 
    9  * @author     Ali Fazelzadeh <afz@php.net> 
    109 * @copyright  2005-2008 Jaws Development Group 
    1110 * @license    http://www.gnu.org/copyleft/lesser.html 
     
    3736        $this->SetTable('acl'); 
    3837        $this->Init(); 
    39         $this->setPriority($this->GetFromTable('ACL_priority')); 
     38        $this->setPriority($this->GetFromTable('/priority')); 
    4039        $this->_LoadedTargets = array( 
    4140            'users'  => array(), 
     
    7069     * Looks for a key in the acl registry 
    7170     * 
    72      * @access  private 
    73      * @param   string  $key  The key 
    74      * @param   string  $comp Component's name 
     71     * @access      private 
     72     * @param   string  $name   Key to find 
    7573     * @return  boolean  The value of the key, if not key found must return null 
    7674     */ 
    77     function Get($key, $comp) 
    78     { 
    79         $value = parent::Get($key, $comp); 
    80         switch ($value) { 
    81             case 'true': 
    82                 return true; 
    83             case 'false': 
    84                 return false; 
    85             default: 
    86                 return null; 
    87         } 
     75    function Get($name) 
     76    { 
     77        $value = parent::Get($name); 
     78        if ($value == 'true') { 
     79            return true; 
     80        } 
     81 
     82        if ($value === null) { 
     83            return null; 
     84        } 
     85 
     86        return false; 
    8887    } 
    8988 
     
    435434    { 
    436435        $data = array(); 
    437         foreach ($this->_Keys as $key => $value) { 
     436        foreach ($this->_Registry as $key => $value) { 
    438437            $data[] = array( 
    439438                'name'   => $key, 
     
    463462        } 
    464463        $this->_LoadedTargets[$where][$target] = $target; 
    465         $this->_Keys = $result + $this->_Keys
    466     } 
    467  
    468     /** 
    469      * Regenerates/updates the internal registry array ($this->_Keys
     464        $this->_Registry = $result + $this->_Registry
     465    } 
     466 
     467    /** 
     468     * Regenerates/updates the internal registry array ($this->_Registry
    470469     * 
    471470     * @access  protected 
     
    494493        } 
    495494 
    496         $this->_Keys = $result + $this->_Keys
     495        $this->_Registry = $result + $this->_Registry
    497496        return true; 
    498497    }