aboutsummaryrefslogtreecommitdiffstats
path: root/include/section_init.inc.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2007-03-07 18:51:58 +0000
committerrub <rub@piwigo.org>2007-03-07 18:51:58 +0000
commit1415354b9c13b0dca0b8933206589f3e3fec972d (patch)
tree15382ec00bdced60ef1ad8e87f0b685c2bef31f9 /include/section_init.inc.php
parent885393221f6c8045d858ea545b1339120eb5b625 (diff)
0000662: Recent elements don't use sometimes time and not truncated datetime
& Standardize system date used git-svn-id: http://piwigo.org/svn/trunk@1876 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-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'].'
;';