Changeset 10005
- Timestamp:
- 11/23/08 14:11:00 (2 months ago)
- Files:
-
- branches/0.8/jaws/html/include/Jaws/ACL.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/0.8/jaws/html/include/Jaws/ACL.php
r9989 r10005 7 7 * @author Ivan Chavero <imcsk8@gluch.org.mx> 8 8 * @author Jonathan Hernandez <ion@suavizado.com> 9 * @author Ali Fazelzadeh <afz@php.net>10 9 * @copyright 2005-2008 Jaws Development Group 11 10 * @license http://www.gnu.org/copyleft/lesser.html … … 37 36 $this->SetTable('acl'); 38 37 $this->Init(); 39 $this->setPriority($this->GetFromTable(' ACL_priority'));38 $this->setPriority($this->GetFromTable('/priority')); 40 39 $this->_LoadedTargets = array( 41 40 'users' => array(), … … 70 69 * Looks for a key in the acl registry 71 70 * 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 75 73 * @return boolean The value of the key, if not key found must return null 76 74 */ 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; 88 87 } 89 88 … … 435 434 { 436 435 $data = array(); 437 foreach ($this->_ Keysas $key => $value) {436 foreach ($this->_Registry as $key => $value) { 438 437 $data[] = array( 439 438 'name' => $key, … … 463 462 } 464 463 $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) 470 469 * 471 470 * @access protected … … 494 493 } 495 494 496 $this->_ Keys = $result + $this->_Keys;495 $this->_Registry = $result + $this->_Registry; 497 496 return true; 498 497 }
