aboutsummaryrefslogtreecommitdiffstats
path: root/include/category_default.inc.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2006-12-10 22:48:32 +0000
committerrub <rub@piwigo.org>2006-12-10 22:48:32 +0000
commit222afe2caa357d6d31efdef87e2444d3e042880d (patch)
tree12386628081ccc334971eb7a8cf3456386e110d1 /include/category_default.inc.php
parent906d9bd7951a77356b9caa04073a7d1c02d44bef (diff)
Feature Issue ID 0000601: Filter all public pages with only recent elements
It's a draft of the feature witch allows to show only recent elements. Development are not finished. Queries and special pages (best rates, tags, etc.) are not modified. Only main php files about images and categories are ok. Before to continue, I prefer to determinate a solution between modify cache implementation or hide counters. Go to http://forum.phpwebgallery.net/viewtopic.php?pid=50015#p50015 git-svn-id: http://piwigo.org/svn/trunk@1648 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/category_default.inc.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/category_default.inc.php b/include/category_default.inc.php
index b1f7bc46a..ae2dc4dce 100644
--- a/include/category_default.inc.php
+++ b/include/category_default.inc.php
@@ -46,8 +46,14 @@ if (count($selection) > 0)
$query = '
SELECT *
FROM '.IMAGES_TABLE.'
- WHERE id IN ('.implode(',', $selection).')
-;';
+ WHERE id IN ('.implode(',', $selection).')';
+ if ($page['filter_mode'])
+ {
+ $query.= '
+ AND date_available > SUBDATE(
+ CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)';
+ }
+ $query.= ';';
$result = pwg_query($query);
while ($row = mysql_fetch_assoc($result))
{