diff options
Diffstat (limited to 'admin/element_set_ranks.php')
-rw-r--r-- | admin/element_set_ranks.php | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/admin/element_set_ranks.php b/admin/element_set_ranks.php index d9a917136..289cc2aba 100644 --- a/admin/element_set_ranks.php +++ b/admin/element_set_ranks.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | Piwigo - a PHP based photo gallery | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org | +// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | // +-----------------------------------------------------------------------+ @@ -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']) @@ -124,7 +118,7 @@ if (isset($_POST['submit'])) } elseif ($image_order_choice=='rank') { - $image_order = 'rank'; + $image_order = 'rank ASC'; } $query = ' UPDATE '.CATEGORIES_TABLE.' @@ -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'); } // +-----------------------------------------------------------------------+ @@ -237,21 +231,21 @@ if (pwg_db_num_rows($result) > 0) // image order management $sort_fields = array( '' => '', - 'file' => l10n('File name, A → Z'), + 'file ASC' => l10n('File name, A → Z'), 'file DESC' => l10n('File name, Z → A'), - 'name' => l10n('Photo title, A → Z'), + 'name ASC' => l10n('Photo title, A → Z'), 'name DESC' => l10n('Photo title, Z → A'), 'date_creation DESC' => l10n('Date created, new → old'), - 'date_creation' => l10n('Date created, old → new'), + 'date_creation ASC' => l10n('Date created, old → new'), 'date_available DESC' => l10n('Date posted, new → old'), - 'date_available' => l10n('Date posted, old → new'), + 'date_available ASC' => l10n('Date posted, old → new'), 'rating_score DESC' => l10n('Rating score, high → low'), - 'rating_score' => l10n('Rating score, low → high'), + 'rating_score ASC' => l10n('Rating score, low → high'), 'hit DESC' => l10n('Visits, high → low'), - 'hit' => l10n('Visits, low → high'), - 'id' => l10n('Numeric identifier, 1 → 9'), + 'hit ASC' => l10n('Visits, low → high'), + 'id ASC' => l10n('Numeric identifier, 1 → 9'), 'id DESC' => l10n('Numeric identifier, 9 → 1'), - 'rank' => l10n('Manual sort order'), + 'rank ASC' => l10n('Manual sort order'), ); $template->assign('image_order_options', $sort_fields); |