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/plugins/LocalFilesEditor/include/tpl.inc.php

    r20714 r25018  
    4040  if (empty($filename))
    4141  {
    42     array_push($page['errors'], l10n('locfiledit_empty_filename'));
     42    $page['errors'][] = l10n('locfiledit_empty_filename');
    4343  }
    4444  if (get_extension($filename) != 'tpl')
     
    4848  if (!preg_match('/^[a-zA-Z0-9-_.]+$/', $filename))
    4949  {
    50     array_push($page['errors'], l10n('locfiledit_filename_error'));
     50    $page['errors'][] = l10n('locfiledit_filename_error');
    5151  }
    5252  if (is_numeric($_POST['tpl_model']) and $_POST['tpl_model'] != '0')
    5353  {
    54     array_push($page['errors'], l10n('locfiledit_model_error'));
     54    $page['errors'][] = l10n('locfiledit_model_error');
    5555  }
    5656  if (file_exists($_POST['tpl_parent'] . '/' . $filename))
    5757  {
    58     array_push($page['errors'], l10n('locfiledit_file_already_exists'));
     58    $page['errors'][] = l10n('locfiledit_file_already_exists');
    5959  }
    6060  if (!empty($page['errors']))
Note: See TracChangeset for help on using the changeset viewer.