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.dc1.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_driver'  => 'mysql', 
    3232        'db_host'    => '', 
     
    3636        'db_prefix'  => 'dc_', 
    3737        'post_limit' => 20, 
    38         'cat_ids'    => array() 
    39     ); 
     38        'cat_ids'    => [] 
     39    ]; 
    4040 
    4141    protected function setInfo() 
     
    141141 
    142142        # db drivers 
    143         $db_drivers = array( 
     143        $db_drivers = [ 
    144144            'mysql'  => 'mysql', 
    145145            'mysqli' => 'mysqli' 
    146         ); 
     146        ]; 
    147147 
    148148        switch ($this->step) { 
     
    190190            case 5: 
    191191                $t = sprintf(__('Importing entries from %d to %d / %d'), $this->post_offset, 
    192                     min(array($this->post_offset + $this->post_limit, $this->post_count)), $this->post_count); 
     192                    min([$this->post_offset + $this->post_limit, $this->post_count]), $this->post_count); 
    193193                printf($this->imForm(5, $t), 
    194                     form::hidden(array('offset'), $this->post_offset) . 
     194                    form::hidden(['offset'], $this->post_offset) . 
    195195                    $this->autoSubmit() 
    196196                ); 
     
    226226        '<h3 class="vertical-separator">' . $legend . '</h3>' . 
    227227        '<div>' . $this->core->formNonce() . 
    228         form::hidden(array('do'), 'step' . $step) . 
     228        form::hidden(['do'], 'step' . $step) . 
    229229        '%s' . '</div>' . 
    230230        '<p class="vertical-separator"><input type="submit" value="' . $submit_value . '" /></p>' . 
     
    300300                    $cur->user_tz          = $this->core->blog->settings->system->blog_timezone; 
    301301                    $cur->user_post_status = $rs->user_post_pub ? 1 : -2; 
    302                     $cur->user_options     = new ArrayObject(array( 
     302                    $cur->user_options     = new ArrayObject([ 
    303303                        'edit_size'   => (integer) $rs->user_edit_size, 
    304304                        'post_format' => $rs->user_post_format 
    305                     )); 
    306  
    307                     $permissions = array(); 
     305                    ]); 
     306 
     307                    $permissions = []; 
    308308                    switch ($rs->user_level) { 
    309309                        case '0': 
     
    573573    protected function importPings($post_id, $new_post_id, $db) 
    574574    { 
    575         $urls = array(); 
     575        $urls = []; 
    576576 
    577577        $rs = $db->select( 
Note: See TracChangeset for help on using the changeset viewer.

Sites map