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

    r3731 r3874  
    146146        # date and time formats 
    147147        $formatDate   = __('%A, %B %e %Y'); 
    148         $date_formats = array('%Y-%m-%d', '%m/%d/%Y', '%d/%m/%Y', '%Y/%m/%d', '%d.%m.%Y', '%b %e %Y', '%e %b %Y', '%Y %b %e', 
     148        $date_formats = ['%Y-%m-%d', '%m/%d/%Y', '%d/%m/%Y', '%Y/%m/%d', '%d.%m.%Y', '%b %e %Y', '%e %b %Y', '%Y %b %e', 
    149149            '%a, %Y-%m-%d', '%a, %m/%d/%Y', '%a, %d/%m/%Y', '%a, %Y/%m/%d', '%B %e, %Y', '%e %B, %Y', '%Y, %B %e', '%e. %B %Y', 
    150             '%A, %B %e, %Y', '%A, %e %B, %Y', '%A, %Y, %B %e', '%A, %Y, %B %e', '%A, %e. %B %Y'); 
    151         $time_formats = array('%H:%M', '%I:%M', '%l:%M', '%Hh%M', '%Ih%M', '%lh%M'); 
     150            '%A, %B %e, %Y', '%A, %e %B, %Y', '%A, %Y, %B %e', '%A, %Y, %B %e', '%A, %e. %B %Y']; 
     151        $time_formats = ['%H:%M', '%I:%M', '%l:%M', '%Hh%M', '%Ih%M', '%lh%M']; 
    152152        if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { 
    153153            $formatDate   = preg_replace('#(?<!%)((?:%%)*)%e#', '\1%#d', $formatDate); 
     
    240240        # Add default favorites 
    241241        $core->favs = new dcFavorites($core); 
    242         $init_favs  = array('posts', 'new_post', 'newpage', 'comments', 'categories', 'media', 'blog_theme', 'widgets', 'simpleMenu', 'prefs', 'help'); 
     242        $init_favs  = ['posts', 'new_post', 'newpage', 'comments', 'categories', 'media', 'blog_theme', 'widgets', 'simpleMenu', 'prefs', 'help']; 
    243243        $core->favs->setFavoriteIDs($init_favs, true); 
    244244 
     
    331331    '<fieldset><legend>' . __('User information') . '</legend>' . 
    332332    '<p><label for="u_firstname">' . __('First Name:') . '</label> ' . 
    333     form::field('u_firstname', 30, 255, array( 
     333    form::field('u_firstname', 30, 255, [ 
    334334        'default'      => html::escapeHTML($u_firstname), 
    335335        'autocomplete' => 'given-name' 
    336     )) . 
     336    ]) . 
    337337    '</p>' . 
    338338    '<p><label for="u_name">' . __('Last Name:') . '</label> ' . 
    339     form::field('u_name', 30, 255, array( 
     339    form::field('u_name', 30, 255, [ 
    340340        'default'      => html::escapeHTML($u_name), 
    341341        'autocomplete' => 'family-name' 
    342     )) . 
     342    ]) . 
    343343    '</p>' . 
    344344    '<p><label for="u_email">' . __('Email:') . '</label> ' . 
    345     form::email('u_email', array( 
     345    form::email('u_email', [ 
    346346        'size'         => 30, 
    347347        'default'      => html::escapeHTML($u_email), 
    348348        'autocomplete' => 'email' 
    349     )) . 
     349    ]) . 
    350350    '</p>' . 
    351351    '</fieldset>' . 
     
    353353    '<fieldset><legend>' . __('Username and password') . '</legend>' . 
    354354    '<p><label for="u_login" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Username:') . ' ' . 
    355     form::field('u_login', 30, 32, array( 
     355    form::field('u_login', 30, 32, [ 
    356356        'default'      => html::escapeHTML($u_login), 
    357357        'extra_html'   => 'required placeholder="' . __('Username') . '"', 
    358358        'autocomplete' => 'username' 
    359     )) . 
     359    ]) . 
    360360    '</label></p>' . 
    361361    '<div class="pw-table">' . 
    362362    '<p class="pw-cell">' . 
    363363    '<label for="u_pwd" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . __('New password:') . '</label>' . 
    364     form::password('u_pwd', 30, 255, array( 
     364    form::password('u_pwd', 30, 255, [ 
    365365        'extra_html'   => 'data-indicator="pwindicator" required placeholder="' . __('Password') . '"', 
    366366        'autocomplete' => 'new-password' 
    367     )) . 
     367    ]) . 
    368368    '</p>' . 
    369369    '<div id="pwindicator">' . 
     
    373373    '</div>' . 
    374374    '<p><label for="u_pwd2" class="required"><abbr title="' . __('Required field') . '">*</abbr> ' . __('Confirm password:') . ' ' . 
    375     form::password('u_pwd2', 30, 255, array( 
     375    form::password('u_pwd2', 30, 255, [ 
    376376        'extra_html'   => 'required placeholder="' . __('Password') . '"', 
    377377        'autocomplete' => 'new-password' 
    378     )) . 
     378    ]) . 
    379379    '</label></p>' . 
    380380    '</fieldset>' . 
     
    421421    '<form action="../auth.php" method="post">' . 
    422422    '<p><input type="submit" value="' . __('Manage your blog now') . '" />' . 
    423     form::hidden(array('user_id'), html::escapeHTML($u_login)) . 
    424     form::hidden(array('user_pwd'), html::escapeHTML($u_pwd)) . 
     423    form::hidden(['user_id'], html::escapeHTML($u_login)) . 
     424    form::hidden(['user_pwd'], html::escapeHTML($u_pwd)) . 
    425425        '</p>' . 
    426426        '</form>'; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map