diff options
Diffstat (limited to 'include/category_default.inc.php')
-rw-r--r-- | include/category_default.inc.php | 10 |
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)) { |