From 6ee66d829b5508e4f9a98e33164d32aedfeb9ec9 Mon Sep 17 00:00:00 2001 From: plegall Date: Wed, 2 Feb 2011 09:35:48 +0000 Subject: bug 2172 fixed: the "sort order" options are removed from the album administration main page. bug 2173 fixed: rename "manual order" into "automatic order" and "by rank" into "manual order" bug 2174 fixed: only show the automatic order options when it's relevant new icon for the "manage photo order" screen hide the numeric rank below the thumbnail (it is confusing for users) tell users that you can drag'n drop to reorder photos bug fixed: the "apply to sub-albums" options for photo orders was not working git-svn-id: http://piwigo.org/svn/trunk@9051 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/element_set_ranks.php | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) (limited to 'admin/element_set_ranks.php') diff --git a/admin/element_set_ranks.php b/admin/element_set_ranks.php index f4b45e970..edb802b58 100644 --- a/admin/element_set_ranks.php +++ b/admin/element_set_ranks.php @@ -89,17 +89,20 @@ $image_order_choice = 'default'; if (isset($_POST['submit'])) { - asort($_POST['rank_of_image'], SORT_NUMERIC); + if (isset($_POST['rank_of_image'])) + { + asort($_POST['rank_of_image'], SORT_NUMERIC); - save_images_order( - $page['category_id'], - array_keys($_POST['rank_of_image']) - ); + save_images_order( + $page['category_id'], + array_keys($_POST['rank_of_image']) + ); - array_push( - $page['infos'], - l10n('Images manual order was saved') - ); + array_push( + $page['infos'], + l10n('Images manual order was saved') + ); + } $image_order = null; if (!empty($_POST['image_order_choice']) @@ -134,6 +137,19 @@ if (isset($_POST['submit'])) UPDATE '.CATEGORIES_TABLE.' SET image_order=\''.$image_order.'\' WHERE id='.$page['category_id']; pwg_query($query); + + if (isset($_POST['image_order_subcats'])) + { + $cat_info = get_cat_info($page['category_id']); + + $query = ' +UPDATE '.CATEGORIES_TABLE.' + SET image_order = '.(isset($image_order) ? '\''.$image_order.'\'' : 'NULL').' + WHERE uppercats LIKE \''.$cat_info['uppercats'].',%\''; + pwg_query($query); + } + + array_push($page['infos'], l10n('Your configuration settings are saved')); } // +-----------------------------------------------------------------------+ -- cgit v1.2.3