aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_calendar.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2006-02-23 02:30:19 +0000
committerrvelices <rv-github@modusoptimus.com>2006-02-23 02:30:19 +0000
commit34538a62f4ac8bc6db41580058fdd040abaa3183 (patch)
treefdde1ecefd0ec41f20d3d5e2d1bcc87357d3e493 /include/functions_calendar.inc.php
parentfe8fbac3cf9af0464d2b0990c88631ff9fd803ac (diff)
new calendar completely integrated
git-svn-id: http://piwigo.org/svn/trunk@1051 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_calendar.inc.php')
-rw-r--r--include/functions_calendar.inc.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/functions_calendar.inc.php b/include/functions_calendar.inc.php
index a5a1e87bb..e39bbe2a0 100644
--- a/include/functions_calendar.inc.php
+++ b/include/functions_calendar.inc.php
@@ -231,6 +231,19 @@ WHERE id IN (' . implode(',',$page['items']) .')';
$query = 'SELECT DISTINCT(id)';
$query .= $calendar->inner_sql;
$query .= $calendar->get_date_where($requested);
+ if ( isset($page['super_order_by']) )
+ {
+ $query .= '
+ '.$conf['order_by'];
+ }
+ else
+ {
+ $order_by = str_replace(
+ 'ORDER BY ',
+ 'ORDER BY '.$calendar->date_field.',', $conf['order_by']
+ );
+ $query .= $order_by;
+ }
$page['items'] = array_from_query($query, 'id');
$page['cat_nb_images'] = count($page['items']);