Dotclear


Ignore:
Timestamp:
09/14/18 12:16:17 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

short notation for array (array() → [])

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/core/class.dc.workspace.php

    r3773 r3874  
    1818    protected $user_id; ///< <b>string</b> User ID 
    1919 
    20     protected $global_prefs = array(); ///< <b>array</b> Global prefs array 
    21     protected $local_prefs  = array(); ///< <b>array</b> Local prefs array 
    22     protected $prefs        = array(); ///< <b>array</b> Associative prefs array 
    23     protected $ws;                     ///< <b>string</b> Current workspace 
     20    protected $global_prefs = []; ///< <b>array</b> Global prefs array 
     21    protected $local_prefs  = []; ///< <b>array</b> Local prefs array 
     22    protected $prefs        = []; ///< <b>array</b> Associative prefs array 
     23    protected $ws;                ///< <b>string</b> Current workspace 
    2424 
    2525    /** 
     
    8787            $array = $rs->user_id ? 'local' : 'global'; 
    8888 
    89             $this->{$array . '_prefs'}[$id] = array( 
     89            $this->{$array . '_prefs'}[$id] = [ 
    9090                'ws'     => $this->ws, 
    9191                'value'  => $value, 
     
    9393                'label'  => (string) $rs->f('pref_label'), 
    9494                'global' => $rs->user_id == '' 
    95             ); 
     95            ]; 
    9696        } 
    9797 
     
    391391        $array = $global ? 'global' : 'local'; 
    392392        unset($this->{$array . '_prefs'}); 
    393         $this->{$array . '_prefs'} = array(); 
     393        $this->{$array . '_prefs'} = []; 
    394394 
    395395        $array       = $global ? 'local' : 'global'; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map