aboutsummaryrefslogtreecommitdiffstats
path: root/include/section_init.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/section_init.inc.php')
-rw-r--r--include/section_init.inc.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/section_init.inc.php b/include/section_init.inc.php
index af633571a..672af0d5c 100644
--- a/include/section_init.inc.php
+++ b/include/section_init.inc.php
@@ -557,8 +557,9 @@ SELECT image_id
SELECT DISTINCT(id)
FROM '.IMAGES_TABLE.'
INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
- WHERE date_available > \''.
- date('Y-m-d', time() - 60*60*24*$user['recent_period']).'\'
+ WHERE
+ date_available >= SUBDATE(
+ CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)
'.$forbidden.'
'.$conf['order_by'].'
;';