diff options
author | mistic100 <mistic@piwigo.org> | 2013-10-19 17:43:04 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2013-10-19 17:43:04 +0000 |
commit | ae707279a1945e383c312cd648d288606a79e341 (patch) | |
tree | 917bdc6e0609ed0eefed5f3693de3a017685acc4 /admin/comments.php | |
parent | 35ff1b7c1f933799397a0ce0a6723cf82f416ff3 (diff) |
remove all array_push (50% slower than []) + some changes missing for feature:2978
git-svn-id: http://piwigo.org/svn/trunk@25018 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/comments.php')
-rw-r--r-- | admin/comments.php | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/admin/comments.php b/admin/comments.php index 6d3fcc507..637790353 100644 --- a/admin/comments.php +++ b/admin/comments.php @@ -41,10 +41,7 @@ if (!empty($_POST)) { if (empty($_POST['comments'])) { - array_push( - $page['errors'], - l10n('Select at least one comment') - ); + $page['errors'][] = l10n('Select at least one comment'); } else { @@ -55,12 +52,9 @@ if (!empty($_POST)) { validate_user_comment($_POST['comments']); - array_push( - $page['infos'], - l10n_dec( - '%d user comment validated', '%d user comments validated', - count($_POST['comments']) - ) + $page['infos'][] = l10n_dec( + '%d user comment validated', '%d user comments validated', + count($_POST['comments']) ); } @@ -68,12 +62,9 @@ if (!empty($_POST)) { delete_user_comment($_POST['comments']); - array_push( - $page['infos'], - l10n_dec( - '%d user comment rejected', '%d user comments rejected', - count($_POST['comments']) - ) + $page['infos'][] = l10n_dec( + '%d user comment rejected', '%d user comments rejected', + count($_POST['comments']) ); } } @@ -148,7 +139,7 @@ while ($row = pwg_db_fetch_assoc($result)) ) ); - array_push($list, $row['id']); + $list[] = $row['id']; } $template->assign('LIST', implode(',', $list) ); |