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
  • plugins/pages/class.listpage.php

    r3774 r3874  
    2020        } else { 
    2121            $pager   = new dcPager($page, $this->rs_count, $nb_per_page, 10); 
    22             $entries = array(); 
     22            $entries = []; 
    2323            if (isset($_REQUEST['entries'])) { 
    2424                foreach ($_REQUEST['entries'] as $v) { 
     
    3030                '<table class="maximal dragable"><thead><tr>'; 
    3131 
    32             $cols = array( 
     32            $cols = [ 
    3333                'title'      => '<th colspan="3" scope="col" class="first">' . __('Title') . '</th>', 
    3434                'date'       => '<th scope="col">' . __('Date') . '</th>', 
     
    3939                '" /><span class="hidden">' . __('Trackbacks') . '</span></th>', 
    4040                'status'     => '<th scope="col">' . __('Status') . '</th>' 
    41             ); 
     41            ]; 
    4242 
    4343            $cols = new ArrayObject($cols); 
     
    115115        ' id="p' . $this->rs->post_id . '">'; 
    116116 
    117         $cols = array( 
     117        $cols = [ 
    118118            'position'   => '<td class="nowrap handle minimal">' . 
    119             form::number(array('order[' . $this->rs->post_id . ']'), array( 
     119            form::number(['order[' . $this->rs->post_id . ']'], [ 
    120120                'min'        => 1, 
    121121                'default'    => $count + 1, 
    122122                'class'      => 'position', 
    123123                'extra_html' => 'title="' . sprintf(__('position of %s'), html::escapeHTML($this->rs->post_title)) . '"' 
    124             )) . 
     124            ]) . 
    125125            '</td>', 
    126126            'check'      => '<td class="nowrap">' . 
    127             form::checkbox(array('entries[]'), $this->rs->post_id, 
    128                 array( 
     127            form::checkbox(['entries[]'], $this->rs->post_id, 
     128                [ 
    129129                    'checked'    => $checked, 
    130130                    'disabled'   => !$this->rs->isEditable(), 
    131131                    'extra_html' => 'title="' . __('Select this page') . '"' 
    132                 ) 
     132                ] 
    133133            ) . '</td>', 
    134134            'title'      => '<td class="maximal" scope="row"><a href="' . 
     
    140140            'trackbacks' => '<td class="nowrap count">' . $this->rs->nb_trackback . '</td>', 
    141141            'status'     => '<td class="nowrap status">' . $img_status . ' ' . $selected . ' ' . $protected . ' ' . $attach . '</td>' 
    142         ); 
     142        ]; 
    143143 
    144144        $cols = new ArrayObject($cols); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map