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

    r25005 r25018  
    5454  if (!is_webmaster())
    5555  {
    56     array_push($page['errors'], l10n('Webmaster status is required.'));
     56    $page['errors'][] = l10n('Webmaster status is required.');
    5757  }
    5858  else
     
    7474  {
    7575    case 'ok':
    76       array_push($page['infos'],
    77         l10n('Language has been successfully installed')
    78       );
     76      $page['infos'][] = l10n('Language has been successfully installed');
    7977      break;
    8078
    8179    case 'temp_path_error':
    82       array_push($page['errors'], l10n('Can\'t create temporary file.'));
     80      $page['errors'][] = l10n('Can\'t create temporary file.');
    8381      break;
    8482
    8583    case 'dl_archive_error':
    86       array_push($page['errors'], l10n('Can\'t download archive.'));
     84      $page['errors'][] = l10n('Can\'t download archive.');
    8785      break;
    8886
    8987    case 'archive_error':
    90       array_push($page['errors'], l10n('Can\'t read or extract archive.'));
     88      $page['errors'][] = l10n('Can\'t read or extract archive.');
    9189      break;
    9290
    9391    default:
    94       array_push(
    95         $page['errors'],
    96         l10n('An error occured during extraction (%s).', htmlspecialchars($_GET['installstatus']))
    97       );
     92      $page['errors'][] = l10n('An error occured during extraction (%s).', htmlspecialchars($_GET['installstatus']));
    9893  } 
    9994}
     
    127122else
    128123{
    129   array_push($page['errors'], l10n('Can\'t connect to server.'));
     124  $page['errors'][] = l10n('Can\'t connect to server.');
    130125}
    131126
Note: See TracChangeset for help on using the changeset viewer.