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.settings.php

    r3731 r3874  
    2323    protected $blog_id; ///< <b>string</b> Blog ID 
    2424 
    25     protected $namespaces = array(); ///< <b>array</b> Associative namespaces array 
     25    protected $namespaces = []; ///< <b>array</b> Associative namespaces array 
    2626 
    2727    protected $ns; ///< <b>string</b> Current namespace 
     
    222222            $this->namespaces[$this->ns]->$n['value'] = $v; 
    223223        } else { 
    224             $this->namespaces[$this->ns]->$n = array( 
     224            $this->namespaces[$this->ns]->$n = [ 
    225225                'ns'     => $this->ns, 
    226226                'value'  => $v, 
     
    228228                'label'  => '', 
    229229                'global' => false 
    230             ); 
     230            ]; 
    231231        } 
    232232    } 
     
    321321        $this->raiseDeprecated('dumpSettings'); 
    322322 
    323         $settings = array(); 
     323        $settings = []; 
    324324        // Parse all the namespaces 
    325325        foreach (array_keys($this->namespaces) as $id => $ns) { 
     
    343343        $this->raiseDeprecated('dumpGlobalSettings'); 
    344344 
    345         $settings = array(); 
     345        $settings = []; 
    346346        // Parse all the namespaces 
    347347        foreach (array_keys($this->namespaces) as $id => $ns) { 
     
    363363    @return    <b>record</b>    A record 
    364364     */ 
    365     public function getGlobalSettings($params = array()) 
     365    public function getGlobalSettings($params = []) 
    366366    { 
    367367        $strReq = "SELECT * from " . $this->table . " "; 
    368         $where  = array(); 
     368        $where  = []; 
    369369        if (!empty($params['ns'])) { 
    370370            $where[] = "setting_ns = '" . $this->con->escape($params['ns']) . "'"; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map