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/element_set_ranks.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 '')
-rw-r--r-- | admin/element_set_ranks.php | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/admin/element_set_ranks.php b/admin/element_set_ranks.php index 98f22a8cd..07afc7cba 100644 --- a/admin/element_set_ranks.php +++ b/admin/element_set_ranks.php @@ -64,13 +64,10 @@ function save_images_order($category_id, $images) $datas = array(); foreach ($images as $id) { - array_push( - $datas, - array( - 'category_id' => $category_id, - 'image_id' => $id, - 'rank' => ++$current_rank, - ) + $datas[] = array( + 'category_id' => $category_id, + 'image_id' => $id, + 'rank' => ++$current_rank, ); } $fields = array( @@ -98,10 +95,7 @@ if (isset($_POST['submit'])) array_keys($_POST['rank_of_image']) ); - array_push( - $page['infos'], - l10n('Images manual order was saved') - ); + $page['infos'][] = l10n('Images manual order was saved'); } if (!empty($_POST['image_order_choice']) @@ -143,7 +137,7 @@ UPDATE '.CATEGORIES_TABLE.' pwg_query($query); } - array_push($page['infos'], l10n('Your configuration settings are saved')); + $page['infos'][] = l10n('Your configuration settings are saved'); } // +-----------------------------------------------------------------------+ |