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:
mistic100
2013-10-19 17:43:04 +00:00
parent 35ff1b7c1f
commit ae707279a1
89 changed files with 700 additions and 1084 deletions
+8 -17
View File
@@ -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) );