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

    r3731 r3874  
    3737    @return    <b>array</b> Array of fileItems 
    3838     */ 
    39     public function getPostMedia($params = array()) 
     39    public function getPostMedia($params = []) 
    4040    { 
    4141        $strReq = 
     
    5555        } 
    5656 
    57         $where = array(); 
     57        $where = []; 
    5858        if (isset($params['post_id'])) { 
    5959            $where[] = "PM.post_id " . $this->con->in($params['post_id']); 
     
    9494        $media_id = (integer) $media_id; 
    9595 
    96         $f = $this->getPostMedia(array('post_id' => $post_id, 'media_id' => $media_id, 'link_type' => $link_type)); 
     96        $f = $this->getPostMedia(['post_id' => $post_id, 'media_id' => $media_id, 'link_type' => $link_type]); 
    9797 
    9898        if (!$f->isEmpty()) { 
     
    157157        $rs = $this->con->select($strReq); 
    158158 
    159         $res = array(); 
     159        $res = []; 
    160160 
    161161        while ($rs->fetch()) { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map