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
  • admin/search.php

    r3731 r3874  
    2626    $q = html::escapeHTML($q); 
    2727 
    28     $params = array(); 
     28    $params = []; 
    2929 
    3030    # Get posts 
     
    3333 
    3434        $params['search']     = $q; 
    35         $params['limit']      = array((($page - 1) * $nb_per_page), $nb_per_page); 
     35        $params['limit']      = [(($page - 1) * $nb_per_page), $nb_per_page]; 
    3636        $params['no_content'] = true; 
    3737        $params['order']      = 'post_dt DESC'; 
     
    5050 
    5151        $params['search']     = $q; 
    52         $params['limit']      = array((($page - 1) * $nb_per_page), $nb_per_page); 
     52        $params['limit']      = [(($page - 1) * $nb_per_page), $nb_per_page]; 
    5353        $params['no_content'] = true; 
    5454        $params['order']      = 'comment_dt DESC'; 
     
    6565 
    6666if ($qtype == 'p') { 
    67     $posts_actions_page = new dcPostsActionsPage($core, $core->adminurl->get("admin.search"), array('q' => $q, 'qtype' => $qtype)); 
     67    $posts_actions_page = new dcPostsActionsPage($core, $core->adminurl->get("admin.search"), ['q' => $q, 'qtype' => $qtype]); 
    6868 
    6969    if ($posts_actions_page->process()) { 
     
    7171    } 
    7272} else { 
    73     $comments_actions_page = new dcCommentsActionsPage($core, $core->adminurl->get("admin.search"), array('q' => $q, 'qtype' => $qtype)); 
     73    $comments_actions_page = new dcCommentsActionsPage($core, $core->adminurl->get("admin.search"), ['q' => $q, 'qtype' => $qtype]); 
    7474 
    7575    if ($comments_actions_page->process()) { 
     
    8080dcPage::open(__('Search'), $starting_scripts, 
    8181    dcPage::breadcrumb( 
    82         array( 
     82        [ 
    8383            html::escapeHTML($core->blog->name) => '', 
    8484            __('Search')                        => '' 
    85         )) 
     85        ]) 
    8686); 
    8787 
     
    9090'<div class="fieldset"><h3>' . __('Search options') . '</h3>' . 
    9191'<p><label for="q">' . __('Query:') . ' </label>' . form::field('q', 30, 255, $q) . '</p>' . 
    92 '<p><label for="qtype1" class="classic">' . form::radio(array('qtype', 'qtype1'), 'p', $qtype == 'p') . ' ' . __('Search in entries') . '</label> ' . 
    93 '<label for="qtype2" class="classic">' . form::radio(array('qtype', 'qtype2'), 'c', $qtype == 'c') . ' ' . __('Search in comments') . '</label></p>' . 
     92'<p><label for="qtype1" class="classic">' . form::radio(['qtype', 'qtype1'], 'p', $qtype == 'p') . ' ' . __('Search in entries') . '</label> ' . 
     93'<label for="qtype2" class="classic">' . form::radio(['qtype', 'qtype2'], 'c', $qtype == 'c') . ' ' . __('Search in comments') . '</label></p>' . 
    9494'<p><input type="submit" value="' . __('Search') . '" /></p>' . 
    9595    '</div>' . 
     
    117117 
    118118            '<p class="col right"><label for="action1" class="classic">' . __('Selected entries action:') . '</label> ' . 
    119             form::combo(array('action', 'action1'), $posts_actions_page->getCombo()) . 
     119            form::combo(['action', 'action1'], $posts_actions_page->getCombo()) . 
    120120            '<input id="do-action" type="submit" value="' . __('ok') . '" /></p>' . 
    121121            $core->formNonce() . 
     
    144144 
    145145            '<p class="col right"><label for="action2" class="classic">' . __('Selected comments action:') . '</label> ' . 
    146             form::combo(array('action', 'action2'), $comments_actions_page->getCombo()) . 
     146            form::combo(['action', 'action2'], $comments_actions_page->getCombo()) . 
    147147            '<input id="do-action" type="submit" value="' . __('ok') . '" /></p>' . 
    148148            $core->formNonce() . 
Note: See TracChangeset for help on using the changeset viewer.

Sites map