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/antispam/index.php

    r3731 r3874  
    4848    # Update filters 
    4949    if (isset($_POST['filters_upd'])) { 
    50         $filters_opt = array(); 
     50        $filters_opt = []; 
    5151        $i           = 0; 
    5252        foreach ($filters as $fid => $f) { 
    53             $filters_opt[$fid] = array(false, $i); 
     53            $filters_opt[$fid] = [false, $i]; 
    5454            $i++; 
    5555        } 
     
    118118if ($filter_gui !== false) { 
    119119    echo dcPage::breadcrumb( 
    120         array( 
     120        [ 
    121121            __('Plugins')                                         => '', 
    122122            $page_name                                            => $p_url, 
    123123            sprintf(__('%s filter configuration'), $filter->name) => '' 
    124         )) . 
     124        ]) . 
    125125    dcPage::notices(); 
    126126 
     
    134134} else { 
    135135    echo dcPage::breadcrumb( 
    136         array( 
     136        [ 
    137137            __('Plugins') => '', 
    138138            $page_name    => '' 
    139         )) . 
     139        ]) . 
    140140    dcPage::notices(); 
    141141 
     
    151151    echo 
    152152    '<ul class="spaminfo">' . 
    153     '<li class="spamcount"><a href="' . $core->adminurl->get('admin.comments', array('status' => '-2')) . '">' . __('Junk comments:') . '</a> ' . 
     153    '<li class="spamcount"><a href="' . $core->adminurl->get('admin.comments', ['status' => '-2']) . '">' . __('Junk comments:') . '</a> ' . 
    154154    '<strong>' . $spam_count . '</strong></li>' . 
    155     '<li class="hamcount"><a href="' . $core->adminurl->get('admin.comments', array('status' => '1')) . '">' . __('Published comments:') . '</a> ' . 
     155    '<li class="hamcount"><a href="' . $core->adminurl->get('admin.comments', ['status' => '1']) . '">' . __('Published comments:') . '</a> ' . 
    156156        $published_count . '</li>' . 
    157157        '</ul>'; 
     
    204204        echo 
    205205        '<tr class="line' . ($f->active ? '' : ' offline') . '" id="f_' . $fid . '">' . 
    206         '<td class="handle">' . form::number(array('f_order[' . $fid . ']'), array( 
     206        '<td class="handle">' . form::number(['f_order[' . $fid . ']'], [ 
    207207            'min'        => 0, 
    208208            'default'    => $i, 
    209209            'class'      => 'position', 
    210210            'extra_html' => 'title="' . __('position') . '"' 
    211         )) . 
     211        ]) . 
    212212        '</td>' . 
    213         '<td class="nowrap">' . form::checkbox(array('filters_active[]'), $fid, 
    214             array( 
     213        '<td class="nowrap">' . form::checkbox(['filters_active[]'], $fid, 
     214            [ 
    215215                'checked'    => $f->active, 
    216216                'extra_html' => 'title="' . __('Active') . '"' 
    217             ) 
     217            ] 
    218218        ) . '</td>' . 
    219         '<td class="nowrap">' . form::checkbox(array('filters_auto_del[]'), $fid, 
    220             array( 
     219        '<td class="nowrap">' . form::checkbox(['filters_auto_del[]'], $fid, 
     220            [ 
    221221                'checked'    => $f->auto_delete, 
    222222                'extra_html' => 'title="' . __('Auto Del.') . '"' 
    223             ) 
     223            ] 
    224224        ) . '</td>' . 
    225225        '<td class="nowrap" scope="row">' . $f->name . '</td>' . 
Note: See TracChangeset for help on using the changeset viewer.

Sites map