From 1415354b9c13b0dca0b8933206589f3e3fec972d Mon Sep 17 00:00:00 2001 From: rub Date: Wed, 7 Mar 2007 18:51:58 +0000 Subject: 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 --- include/section_init.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/section_init.inc.php') 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'].' ;'; -- cgit v1.2.3