From c414a9133eea12bf5ccfd8e08d5af0a5ff270cf0 Mon Sep 17 00:00:00 2001 From: z0rglub Date: Thu, 26 Aug 2004 23:00:28 +0000 Subject: possibility to choose the date field you want to use for calendar category (date_available or date_creation). git-svn-id: http://piwigo.org/svn/trunk@497 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_category.inc.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'include/functions_category.inc.php') diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php index 1b075f70a..da3e5e31e 100644 --- a/include/functions_category.inc.php +++ b/include/functions_category.inc.php @@ -686,13 +686,11 @@ SELECT COUNT(DISTINCT(id)) AS nb_total_images $page['title'] .= $page['calendar_year']; $page['title'] .= ')'; } + + $page['where'] = 'WHERE '.$conf['calendar_datefield'].' IS NOT NULL'; if (isset($forbidden)) { - $page['where'] = 'WHERE '.$forbidden; - } - else - { - $page['where'] = 'WHERE 1=1'; + $page['where'].= ' AND '.$forbidden; } } -- cgit v1.2.3