From 5046b3c2105bdfae23d6835c110606ea9e7ff055 Mon Sep 17 00:00:00 2001 From: rub Date: Wed, 13 Dec 2006 00:05:16 +0000 Subject: Feature Issue ID 0000601: Filter all public pages with only recent elements Last draft before final development. There a icon for global mode and one other for local mode. Counters are not good, filter on images are not everywhere applied, moment to update cache are not optimized, ... Go to http://forum.phpwebgallery.net/viewtopic.php?id=9490 git-svn-id: http://piwigo.org/svn/trunk@1651 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/category_cats.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/category_cats.inc.php') diff --git a/include/category_cats.inc.php b/include/category_cats.inc.php index 36f19ca49..c84bdf6e9 100644 --- a/include/category_cats.inc.php +++ b/include/category_cats.inc.php @@ -55,7 +55,7 @@ SELECT ON id = cat_id and user_id = '.$user['id'].' WHERE id_uppercat '. (!isset($page['category']) ? 'is NULL' : '= '.$page['category']); - if ($page['filter_mode']) + if ($page['filter_local_mode']) { $query.= ' AND max_date_last > SUBDATE( @@ -85,7 +85,7 @@ while ($row = mysql_fetch_assoc($result)) SELECT image_id FROM '.CATEGORIES_TABLE.' AS c INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON ic.category_id = c.id'; - if ($page['filter_mode']) + if ($page['filter_local_mode'] or $user['filter_global_mode']) { $query.= ' INNER JOIN '.IMAGES_TABLE.' AS i on ic.image_id = i.id '; @@ -93,7 +93,7 @@ SELECT image_id $query.= ' WHERE uppercats REGEXP \'(^|,)'.$row['id'].'(,|$)\' AND c.id NOT IN ('.$user['forbidden_categories'].')'; - if ($page['filter_mode']) + if ($page['filter_local_mode'] or $user['filter_global_mode']) { $query.= ' AND i.date_available > SUBDATE( @@ -117,7 +117,7 @@ SELECT representative_picture_id ON id = cat_id and user_id = '.$user['id'].' WHERE uppercats REGEXP \'(^|,)'.$row['id'].'(,|$)\' AND representative_picture_id IS NOT NULL'; - if ($page['filter_mode']) + if ($page['filter_local_mode'] or $user['filter_global_mode']) { $query.= ' AND max_date_last > SUBDATE( -- cgit v1.2.3