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

    r25005 r25018  
    5151  if (!is_webmaster())
    5252  {
    53     array_push($page['errors'], l10n('Webmaster status is required.'));
     53    $page['errors'][] = l10n('Webmaster status is required.');
    5454  }
    5555  else
     
    7676  {
    7777    case 'ok':
    78       array_push(
    79         $page['infos'],
    80         l10n('Theme has been successfully installed')
    81         );
     78      $page['infos'][] = l10n('Theme has been successfully installed');
    8279      break;
    8380
    8481    case 'temp_path_error':
    85       array_push($page['errors'], l10n('Can\'t create temporary file.'));
     82      $page['errors'][] = l10n('Can\'t create temporary file.');
    8683      break;
    8784
    8885    case 'dl_archive_error':
    89       array_push($page['errors'], l10n('Can\'t download archive.'));
     86      $page['errors'][] = l10n('Can\'t download archive.');
    9087      break;
    9188
    9289    case 'archive_error':
    93       array_push($page['errors'], l10n('Can\'t read or extract archive.'));
     90      $page['errors'][] = l10n('Can\'t read or extract archive.');
    9491      break;
    9592
    9693    default:
    97       array_push(
    98         $page['errors'],
    99         l10n('An error occured during extraction (%s).', htmlspecialchars($_GET['installstatus']))
     94      $page['errors'][] = l10n(
     95        'An error occured during extraction (%s).',
     96        htmlspecialchars($_GET['installstatus'])
    10097        );
    10198  } 
     
    131128else
    132129{
    133   array_push($page['errors'], l10n('Can\'t connect to server.'));
     130  $page['errors'][] = l10n('Can\'t connect to server.');
    134131}
    135132
Note: See TracChangeset for help on using the changeset viewer.