Ignore:
Timestamp:
Jan 31, 2011, 9:56:20 AM (14 years ago)
Author:
grum
Message:

release 3.4.0
keep compatibility with previous release

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/GrumPluginClasses/classes/GPCUsersGroups.class.inc.php

    r8961 r9001  
    4141class GPCAllowedAccess
    4242{
    43   protected $accessList;
     43  public $access_list;
    4444  protected $accessMode='a'; // 'a' : allowed, 'n' : not allowed
    4545
     
    6262  public function __destruct()
    6363  {
    64     unset($this->accessList);
     64    unset($this->access_list);
    6565  }
    6666
     
    7070  protected function initList()
    7171  {
    72     $this->accessList=array();
     72    $this->access_list=array();
    7373  }
    7474
     
    8484  function getList()
    8585  {
    86     return($this->accessList);
     86    return($this->access_list);
    8787  }
    8888
     
    9595  function setAllowed($id, $allowed)
    9696  {
    97     if(isset($this->accessList[$id]))
    98     {
    99       $this->accessList[$id]['allowed']=$allowed;
     97    if(isset($this->access_list[$id]))
     98    {
     99      $this->access_list[$id]['allowed']=$allowed;
    100100    }
    101101  }
     
    116116    $idList=array_flip($idList);
    117117
    118     foreach($this->accessList as $key => $val)
     118    foreach($this->access_list as $key => $val)
    119119    {
    120120      if(isset($idList[$key]))
    121121      {
    122         $this->accessList[$key]['allowed']=$allowed;
     122        $this->access_list[$key]['allowed']=$allowed;
    123123      }
    124124      else
    125125      {
    126         $this->accessList[$key]['allowed']=!$allowed;
     126        $this->access_list[$key]['allowed']=!$allowed;
    127127      }
    128128    }
     
    139139    $returned=Array();
    140140
    141     foreach($this->accessList as $key => $val)
     141    foreach($this->access_list as $key => $val)
    142142    {
    143143      if($val['allowed']) $returned[]=$val;
     
    155155  function isAllowed($id)
    156156  {
    157     if(isset($this->accessList[$id]))
    158     {
    159       return($this->accessList[$id]['allowed']);
     157    if(isset($this->access_list[$id]))
     158    {
     159      return($this->access_list[$id]['allowed']);
    160160    }
    161161    else
     
    177177 * ----------------------------------------------------------------------------
    178178 *  this class provides base functions to manage groups access
    179  *  initList redefined to initialize accessList from database GROUPS
     179 *  initList redefined to initialize access_list from database GROUPS
    180180 * ----------------------------------------------------------------------------
    181181 */
     
    187187  protected  function initList()
    188188  {
    189     $this->accessList=array();
     189    $this->access_list=array();
    190190    $sql="SELECT id, name FROM ".GROUPS_TABLE." ORDER BY name";
    191191    $result=pwg_query($sql);
     
    194194      while($row=pwg_db_fetch_assoc($result))
    195195      {
    196         $this->accessList[$row['id']]=array(
     196        $this->access_list[$row['id']]=array(
    197197            'id' => $row['id'],
    198198            'name' => $row['name'],
     
    214214 * ----------------------------------------------------------------------------
    215215 *  this class provides base functions to manage users access
    216  *  initList redefined to initialize accessList from piwigo's predefined values
     216 *  initList redefined to initialize access_list from piwigo's predefined values
    217217 * ----------------------------------------------------------------------------
    218218 */
     
    225225  {
    226226    $usersList = array('guest', 'generic', 'normal', 'webmaster', 'admin');
    227     $this->accessList=array();
     227    $this->access_list=array();
    228228    foreach($usersList as $val)
    229229    {
    230       $this->accessList[$val]=array(
     230      $this->access_list[$val]=array(
    231231          'id' => $val,
    232232          'name' => l10n('user_status_'.$val),
Note: See TracChangeset for help on using the changeset viewer.