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

    r19703 r25018  
    4242  if (empty($_POST['comments']))
    4343  {
    44     array_push(
    45       $page['errors'],
    46       l10n('Select at least one comment')
    47       );
     44    $page['errors'][] = l10n('Select at least one comment');
    4845  }
    4946  else
     
    5653      validate_user_comment($_POST['comments']);
    5754
    58       array_push(
    59         $page['infos'],
    60         l10n_dec(
    61           '%d user comment validated', '%d user comments validated',
    62           count($_POST['comments'])
    63           )
     55      $page['infos'][] = l10n_dec(
     56        '%d user comment validated', '%d user comments validated',
     57        count($_POST['comments'])
    6458        );
    6559    }
     
    6963      delete_user_comment($_POST['comments']);
    7064
    71       array_push(
    72         $page['infos'],
    73         l10n_dec(
    74           '%d user comment rejected', '%d user comments rejected',
    75           count($_POST['comments'])
    76           )
     65      $page['infos'][] = l10n_dec(
     66        '%d user comment rejected', '%d user comments rejected',
     67        count($_POST['comments'])
    7768        );
    7869    }
     
    149140    );
    150141
    151   array_push($list, $row['id']);
     142  $list[] = $row['id'];
    152143}
    153144
Note: See TracChangeset for help on using the changeset viewer.