aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-07-26 00:51:08 +0000
committerrvelices <rv-github@modusoptimus.com>2006-07-26 00:51:08 +0000
commitaca06a08aa8d2148ba6198811907fbb61a4e8f57 (patch)
tree021145a2e9d9e75ace7ce0013a66756a22684475 /include
parent7e79e15d180c5621d83a6906968317de58eae722 (diff)
feature 169: each category can have its own image order
git-svn-id: http://piwigo.org/svn/trunk@1500 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/functions_category.inc.php3
-rw-r--r--include/section_init.inc.php5
2 files changed, 7 insertions, 1 deletions
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php
index 2aff86975..939a72e77 100644
--- a/include/functions_category.inc.php
+++ b/include/functions_category.inc.php
@@ -110,7 +110,8 @@ function get_cat_info( $id )
{
$infos = array('nb_images','id_uppercat','comment','site_id'
,'dir','date_last','uploadable','status','visible'
- ,'representative_picture_id','uppercats','commentable');
+ ,'representative_picture_id','uppercats','commentable'
+ ,'image_order');
$query = '
SELECT '.implode(',', $infos).'
diff --git a/include/section_init.inc.php b/include/section_init.inc.php
index b2bb4c90e..1aa58516c 100644
--- a/include/section_init.inc.php
+++ b/include/section_init.inc.php
@@ -342,6 +342,11 @@ if ('categories' == $page['section'])
if (!isset($page['chronology_field']))
{
+ if ( !empty($result['image_order']) and !isset($page['super_order_by']) )
+ {
+ $conf[ 'order_by' ] = ' ORDER BY '.$result['image_order'];
+ }
+
$query = '
SELECT image_id
FROM '.IMAGE_CATEGORY_TABLE.'