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

    r3813 r3874  
    7171{ 
    7272    if ($s['type'] == 'boolean') { 
    73         $field = form::combo(array($field_name . '[' . $ns . '][' . $id . ']', $field_name . '_' . $ns . '_' . $id), 
    74             array(__('yes') => 1, __('no') => 0), $s['value'] ? 1 : 0); 
     73        $field = form::combo([$field_name . '[' . $ns . '][' . $id . ']', $field_name . '_' . $ns . '_' . $id], 
     74            [__('yes') => 1, __('no') => 0], $s['value'] ? 1 : 0); 
    7575    } else { 
    7676        if ($s['type'] == 'array') { 
    77             $field = form::field(array($field_name . '[' . $ns . '][' . $id . ']', $field_name . '_' . $ns . '_' . $id), 40, null, 
     77            $field = form::field([$field_name . '[' . $ns . '][' . $id . ']', $field_name . '_' . $ns . '_' . $id], 40, null, 
    7878                html::escapeHTML(json_encode($s['value']))); 
    7979        } else { 
    80             $field = form::field(array($field_name . '[' . $ns . '][' . $id . ']', $field_name . '_' . $ns . '_' . $id), 40, null, 
     80            $field = form::field([$field_name . '[' . $ns . '][' . $id . ']', $field_name . '_' . $ns . '_' . $id], 40, null, 
    8181                html::escapeHTML($s['value'])); 
    8282        } 
    8383    } 
    84     $type = form::hidden(array($field_name . '_type' . '[' . $ns . '][' . $id . ']', $field_name . '_' . $ns . '_' . $id . '_type'), 
     84    $type = form::hidden([$field_name . '_type' . '[' . $ns . '][' . $id . ']', $field_name . '_' . $ns . '_' . $id . '_type'], 
    8585        html::escapeHTML($s['type'])); 
    8686 
     
    105105<?php 
    106106echo dcPage::breadcrumb( 
    107     array( 
     107    [ 
    108108        __('System')                        => '', 
    109109        html::escapeHTML($core->blog->name) => '', 
    110110        __('about:config')                  => '' 
    111     )) . 
     111    ]) . 
    112112dcPage::notices(); 
    113113?> 
     
    129129$table_footer = '</tbody></table></div>'; 
    130130 
    131 $settings = array(); 
     131$settings = []; 
    132132foreach ($core->blog->settings->dumpNamespaces() as $ns => $namespace) { 
    133133    foreach ($namespace->dumpSettings() as $k => $v) { 
     
    137137ksort($settings); 
    138138if (count($settings) > 0) { 
    139     $ns_combo = array(); 
     139    $ns_combo = []; 
    140140    foreach ($settings as $ns => $s) { 
    141141        $ns_combo[$ns] = '#l_' . $ns; 
     
    174174 
    175175<?php 
    176 $settings = array(); 
     176$settings = []; 
    177177 
    178178foreach ($core->blog->settings->dumpNamespaces() as $ns => $namespace) { 
     
    185185 
    186186if (count($settings) > 0) { 
    187     $ns_combo = array(); 
     187    $ns_combo = []; 
    188188    foreach ($settings as $ns => $s) { 
    189189        $ns_combo[$ns] = '#g_' . $ns; 
Note: See TracChangeset for help on using the changeset viewer.

Sites map