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/plugins_new.php

    r25005 r25018  
    4040  if (!is_webmaster())
    4141  {
    42     array_push($page['errors'], l10n('Webmaster status is required.'));
     42    $page['errors'][] = l10n('Webmaster status is required.');
    4343  }
    4444  else
     
    5858  {
    5959    case 'ok':
    60       array_push($page['infos'],
    61         l10n('Plugin has been successfully copied'),
    62         l10n('You might go to plugin list to install and activate it.'));
     60      $page['infos'][] = l10n('Plugin has been successfully copied');
     61      $page['infos'][] = l10n('You might go to plugin list to install and activate it.');
    6362      break;
    6463
    6564    case 'temp_path_error':
    66       array_push($page['errors'], l10n('Can\'t create temporary file.'));
     65      $page['errors'][] = l10n('Can\'t create temporary file.');
    6766      break;
    6867
    6968    case 'dl_archive_error':
    70       array_push($page['errors'], l10n('Can\'t download archive.'));
     69      $page['errors'][] = l10n('Can\'t download archive.');
    7170      break;
    7271
    7372    case 'archive_error':
    74       array_push($page['errors'], l10n('Can\'t read or extract archive.'));
     73      $page['errors'][] = l10n('Can\'t read or extract archive.');
    7574      break;
    7675
    7776    default:
    78       array_push($page['errors'],
    79         l10n('An error occured during extraction (%s).', htmlspecialchars($_GET['installstatus'])),
    80         l10n('Please check "plugins" folder and sub-folders permissions (CHMOD).'));
     77      $page['errors'][] = l10n('An error occured during extraction (%s).', htmlspecialchars($_GET['installstatus']));
     78      $page['errors'][] = l10n('Please check "plugins" folder and sub-folders permissions (CHMOD).');
    8179  } 
    8280}
     
    136134else
    137135{
    138   array_push($page['errors'], l10n('Can\'t connect to server.'));
     136  $page['errors'][] = l10n('Can\'t connect to server.');
    139137}
    140138
Note: See TracChangeset for help on using the changeset viewer.