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/importExport/inc/class.dc.import.wp.php

    r3731 r3874  
    2525    protected $post_count  = 0; 
    2626 
    27     protected $has_table = array(); 
     27    protected $has_table = []; 
    2828 
    2929    protected $vars; 
    30     protected $base_vars = array( 
     30    protected $base_vars = [ 
    3131        'db_host'            => '', 
    3232        'db_name'            => '', 
     
    4141        'post_formater'      => 'xhtml', 
    4242        'comment_formater'   => 'xhtml', 
    43         'user_ids'           => array(), 
    44         'cat_ids'            => array(), 
     43        'user_ids'           => [], 
     44        'cat_ids'            => [], 
    4545        'permalink_template' => 'p=%post_id%', 
    46         'permalink_tags'     => array( 
     46        'permalink_tags'     => [ 
    4747            '%year%', 
    4848            '%monthnum%', 
     
    5555            '%category%', 
    5656            '%author%' 
    57         ) 
    58     ); 
     57        ] 
     58    ]; 
    5959    protected $formaters; 
    6060 
     
    244244            case 5: 
    245245                $t = sprintf(__('Importing entries from %d to %d / %d'), $this->post_offset, 
    246                     min(array($this->post_offset + $this->post_limit, $this->post_count)), $this->post_count); 
     246                    min([$this->post_offset + $this->post_limit, $this->post_count]), $this->post_count); 
    247247                printf($this->imForm(5, $t), 
    248                     form::hidden(array('offset'), $this->post_offset) . 
     248                    form::hidden(['offset'], $this->post_offset) . 
    249249                    $this->autoSubmit() 
    250250                ); 
     
    271271        '<h3 class="vertical-separator">' . $legend . '</h3>' . 
    272272        '<div>' . $this->core->formNonce() . 
    273         form::hidden(array('do'), 'step' . $step) . 
     273        form::hidden(['do'], 'step' . $step) . 
    274274        '%s' . '</div>' . 
    275275        '<p><input type="submit" value="' . $submit_value . '" /></p>' . 
     
    347347                    $cur->user_lang        = $this->core->blog->settings->system->lang; 
    348348                    $cur->user_tz          = $this->core->blog->settings->system->blog_timezone; 
    349                     $permissions           = array(); 
     349                    $permissions           = []; 
    350350 
    351351                    $rs_meta = $db->select('SELECT * FROM ' . $prefix . 'usermeta WHERE user_id = ' . $rs->ID); 
     
    362362                                break; 
    363363                            case 'rich_editing': 
    364                                 $cur->user_options = new ArrayObject(array( 
     364                                $cur->user_options = new ArrayObject([ 
    365365                                    'enable_wysiwyg' => $rs_meta->meta_value == 'true' ? true : false 
    366                                 )); 
     366                                ]); 
    367367                                break; 
    368368                            case 'wp_user_level': 
     
    587587        } 
    588588 
    589         $permalink_infos = array( 
     589        $permalink_infos = [ 
    590590            date('Y', strtotime($cur->post_dt)), 
    591591            date('m', strtotime($cur->post_dt)), 
     
    598598            $cur->cat_id, 
    599599            $cur->user_id 
    600         ); 
     600        ]; 
    601601        $cur->post_url = str_replace( 
    602602            $this->vars['permalink_tags'], 
     
    727727    protected function importPings($post_id, $new_post_id, $db) 
    728728    { 
    729         $urls  = array(); 
    730         $pings = array(); 
     729        $urls  = []; 
     730        $pings = []; 
    731731 
    732732        $rs = $db->select( 
Note: See TracChangeset for help on using the changeset viewer.

Sites map