Changeset 9001 for extensions
- Timestamp:
- Jan 31, 2011, 9:56:20 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/GrumPluginClasses/classes/GPCUsersGroups.class.inc.php
r8961 r9001 41 41 class GPCAllowedAccess 42 42 { 43 p rotected $accessList;43 public $access_list; 44 44 protected $accessMode='a'; // 'a' : allowed, 'n' : not allowed 45 45 … … 62 62 public function __destruct() 63 63 { 64 unset($this->access List);64 unset($this->access_list); 65 65 } 66 66 … … 70 70 protected function initList() 71 71 { 72 $this->access List=array();72 $this->access_list=array(); 73 73 } 74 74 … … 84 84 function getList() 85 85 { 86 return($this->access List);86 return($this->access_list); 87 87 } 88 88 … … 95 95 function setAllowed($id, $allowed) 96 96 { 97 if(isset($this->access List[$id]))98 { 99 $this->access List[$id]['allowed']=$allowed;97 if(isset($this->access_list[$id])) 98 { 99 $this->access_list[$id]['allowed']=$allowed; 100 100 } 101 101 } … … 116 116 $idList=array_flip($idList); 117 117 118 foreach($this->access List as $key => $val)118 foreach($this->access_list as $key => $val) 119 119 { 120 120 if(isset($idList[$key])) 121 121 { 122 $this->access List[$key]['allowed']=$allowed;122 $this->access_list[$key]['allowed']=$allowed; 123 123 } 124 124 else 125 125 { 126 $this->access List[$key]['allowed']=!$allowed;126 $this->access_list[$key]['allowed']=!$allowed; 127 127 } 128 128 } … … 139 139 $returned=Array(); 140 140 141 foreach($this->access List as $key => $val)141 foreach($this->access_list as $key => $val) 142 142 { 143 143 if($val['allowed']) $returned[]=$val; … … 155 155 function isAllowed($id) 156 156 { 157 if(isset($this->access List[$id]))158 { 159 return($this->access List[$id]['allowed']);157 if(isset($this->access_list[$id])) 158 { 159 return($this->access_list[$id]['allowed']); 160 160 } 161 161 else … … 177 177 * ---------------------------------------------------------------------------- 178 178 * this class provides base functions to manage groups access 179 * initList redefined to initialize access List from database GROUPS179 * initList redefined to initialize access_list from database GROUPS 180 180 * ---------------------------------------------------------------------------- 181 181 */ … … 187 187 protected function initList() 188 188 { 189 $this->access List=array();189 $this->access_list=array(); 190 190 $sql="SELECT id, name FROM ".GROUPS_TABLE." ORDER BY name"; 191 191 $result=pwg_query($sql); … … 194 194 while($row=pwg_db_fetch_assoc($result)) 195 195 { 196 $this->access List[$row['id']]=array(196 $this->access_list[$row['id']]=array( 197 197 'id' => $row['id'], 198 198 'name' => $row['name'], … … 214 214 * ---------------------------------------------------------------------------- 215 215 * this class provides base functions to manage users access 216 * initList redefined to initialize access List from piwigo's predefined values216 * initList redefined to initialize access_list from piwigo's predefined values 217 217 * ---------------------------------------------------------------------------- 218 218 */ … … 225 225 { 226 226 $usersList = array('guest', 'generic', 'normal', 'webmaster', 'admin'); 227 $this->access List=array();227 $this->access_list=array(); 228 228 foreach($usersList as $val) 229 229 { 230 $this->access List[$val]=array(230 $this->access_list[$val]=array( 231 231 'id' => $val, 232 232 'name' => l10n('user_status_'.$val),
Note: See TracChangeset
for help on using the changeset viewer.