mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-20 08:33:03 +02:00
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
This commit is contained in:
+8
-17
@@ -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) );
|
||||
|
||||
Reference in New Issue
Block a user