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

    r3834 r3874  
    1414require dirname(__FILE__) . '/class.themeEditor.php'; 
    1515 
    16 $file_default = $file = array('c' => null, 'w' => false, 'type' => null, 'f' => null, 'default_file' => false); 
     16$file_default = $file = ['c' => null, 'w' => false, 'type' => null, 'f' => null, 'default_file' => false]; 
    1717 
    1818# Get interface setting 
     
    6666    <title><?php echo __('Edit theme files'); ?></title> 
    6767    <?php 
    68 echo dcPage::jsVars(array( 
     68echo dcPage::jsVars([ 
    6969    'dotclear.msg.saving_document'    => __("Saving document..."), 
    7070    'dotclear.msg.document_saved'     => __("Document saved"), 
    7171    'dotclear.msg.error_occurred'     => __("An error occurred:"), 
    7272    'dotclear.msg.confirm_reset_file' => __("Are you sure you want to reset this file?") 
    73 )) . 
     73]) . 
    7474dcPage::jsConfirmClose('file-form') . 
    7575dcPage::jsLoad(dcPage::getPF('themeEditor/js/script.js')); 
    7676if ($user_ui_colorsyntax) { 
    77     echo dcPage::jsVars(array('dotclear.colorsyntax' => $user_ui_colorsyntax)); 
     77    echo dcPage::jsVars(['dotclear.colorsyntax' => $user_ui_colorsyntax]); 
    7878    echo dcPage::jsLoadCodeMirror($user_ui_colorsyntax_theme); 
    7979} 
     
    8585<?php 
    8686echo dcPage::breadcrumb( 
    87     array( 
     87    [ 
    8888        html::escapeHTML($core->blog->name) => '', 
    8989        __('Blog appearance')               => $core->adminurl->get('admin.blog.theme'), 
    9090        __('Edit theme files')              => '' 
    91     )) . 
     91    ]) . 
    9292dcPage::notices(); 
    9393?> 
     
    110110    '<div class="fieldset"><h3>' . __('File editor') . '</h3>' . 
    111111    '<p><label for="file_content">' . sprintf(__('Editing file %s'), '<strong>' . $file['f']) . '</strong></label></p>' . 
    112     '<p>' . form::textarea('file_content', 72, 25, array( 
     112    '<p>' . form::textarea('file_content', 72, 25, [ 
    113113        'default'  => html::escapeHTML($file['c']), 
    114114        'class'    => 'maximal', 
    115115        'disabled' => !$file['w'] 
    116     )) . '</p>'; 
     116    ]) . '</p>'; 
    117117 
    118118    if ($file['w']) { 
     
    121121        ($o->deletableFile($file['type'], $file['f']) ? '<input type="submit" name="delete" class="delete" value="' . __('Reset') . '" />' : '') . 
    122122        $core->formNonce() . 
    123             ($file['type'] ? form::hidden(array($file['type']), $file['f']) : '') . 
     123            ($file['type'] ? form::hidden([$file['type']], $file['f']) : '') . 
    124124            '</p>'; 
    125125    } else { 
Note: See TracChangeset for help on using the changeset viewer.

Sites map