Ignore:
Timestamp:
Oct 19, 2013, 7:43:04 PM (11 years ago)
Author:
mistic100
Message:

remove all array_push (50% slower than []) + some changes missing for feature:2978

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/configuration.php

    r23813 r25018  
    155155          if ( !count($_POST['order_by']) )
    156156          {
    157             array_push($page['errors'], l10n('No order field selected'));
     157            $page['errors'][] = l10n('No order field selected');
    158158          }
    159159          else
     
    180180        else
    181181        {
    182           array_push($page['errors'], l10n('No order field selected'));
     182          $page['errors'][] = l10n('No order field selected');
    183183        }
    184184      }
     
    208208           or $_POST['nb_comment_page'] > 50)
    209209      {
    210         array_push($page['errors'], l10n('The number of comments a page must be between 5 and 50 included.'));
     210        $page['errors'][] = l10n('The number of comments a page must be between 5 and 50 included.');
    211211      }
    212212      foreach( $comments_checkboxes as $checkbox)
     
    226226            or $_POST['nb_categories_page'] < 4)
    227227      {
    228         array_push($page['errors'], l10n('The number of albums a page must be above 4.'));
     228        $page['errors'][] = l10n('The number of albums a page must be above 4.');
    229229      }
    230230      foreach( $display_checkboxes as $checkbox)
     
    269269      }
    270270    }
    271     array_push($page['infos'], l10n('Information data registered in database'));
     271    $page['infos'][] = l10n('Information data registered in database');
    272272  }
    273273
     
    283283  clear_derivative_cache();
    284284
    285   array_push(
    286     $page['infos'],
    287     l10n('Your configuration settings are saved')
    288     );
     285  $page['infos'][] = l10n('Your configuration settings are saved');
    289286}
    290287
     
    325322    if (order_by_is_local())
    326323    {
    327       array_push($page['warnings'], l10n('You have specified <i>$conf[\'order_by\']</i> in your local configuration file, this parameter in deprecated, please remove it or rename it into <i>$conf[\'order_by_custom\']</i> !'));
     324      $page['warnings'][] = l10n('You have specified <i>$conf[\'order_by\']</i> in your local configuration file, this parameter in deprecated, please remove it or rename it into <i>$conf[\'order_by_custom\']</i> !');
    328325    }
    329326
     
    401398      // Reload user
    402399      $edit_user = build_user($conf['guest_id'], false);
    403       array_push($page['infos'], l10n('Information data registered in database'));
     400      $page['infos'][] = l10n('Information data registered in database');
    404401    }
    405402    $page['errors'] = array_merge($page['errors'], $errors);
Note: See TracChangeset for help on using the changeset viewer.