diff options
author | plegall <plg@piwigo.org> | 2008-09-11 21:40:00 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2008-09-11 21:40:00 +0000 |
commit | d39db9aaaf43eaedd634a7a5b7d06bcb69d41152 (patch) | |
tree | 645010e01f3d84ecbc131c883ca941c50386489b /include/functions_category.inc.php | |
parent | fdffe42bdc703a9f2391c77ae0256c33a3eac935 (diff) |
feature 169 added: ability to manually sort images inside a category. A
dedicated screen let the administrator sort the images (pur HTML, no
JavaScript yet). The "rank" sort order is available only for a category
without flat mode. New database column image_category.rank.
git-svn-id: http://piwigo.org/svn/trunk@2517 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/functions_category.inc.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php index 0bca0897a..92e9cf229 100644 --- a/include/functions_category.inc.php +++ b/include/functions_category.inc.php @@ -257,15 +257,21 @@ SELECT galleries_url // returns an array of image orders available for users/visitors function get_category_preferred_image_orders() { - global $conf; + global $conf, $page; + return array( array(l10n('default_sort'), '', true), array(l10n('Average rate'), 'average_rate DESC', $conf['rate']), array(l10n('most_visited_cat'), 'hit DESC', true), array(l10n('Creation date'), 'date_creation DESC', true), array(l10n('Post date'), 'date_available DESC', true), - array(l10n('File name'), 'file ASC', true) - ); + array(l10n('File name'), 'file ASC', true), + array( + l10n('Rank'), + 'rank ASC', + ('categories' == $page['section'] and !isset($page['flat'])) + ) + ); } function display_select_categories($categories, |