Changeset 1876
- Timestamp:
- Mar 7, 2007, 7:51:58 PM (17 years ago)
- Location:
- trunk/include
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/category_cats.inc.php
r1873 r1876 40 40 FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' 41 41 ON id = cat_id and user_id = '.$user['id'].' 42 WHERE date_last > SUBDATE(42 WHERE date_last >= SUBDATE( 43 43 CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY 44 44 ) -
trunk/include/filter.inc.php
r1860 r1876 96 96 } 97 97 $query.= ' 98 date_available >SUBDATE(98 date_available >= SUBDATE( 99 99 CURRENT_DATE,INTERVAL '.$filter['recent_period'].' DAY)'; 100 100 -
trunk/include/functions_html.inc.php
r1866 r1876 56 56 } 57 57 58 $diff = time() - $unixtime; 58 if (!isset($page['get_icon_cache']['unix_timestamp'])) 59 { 60 // Use MySql date in order to standardize all recent "actions/queries" 61 list($page['get_icon_cache']['unix_timestamp']) = 62 mysql_fetch_array(pwg_query('select UNIX_TIMESTAMP(CURRENT_DATE)')); 63 } 64 65 $diff = $page['get_icon_cache']['unix_timestamp'] - $unixtime; 59 66 $day_in_seconds = 24*60*60; 60 67 $page['get_icon_cache'][$date] = false; 61 if ( $diff < $user['recent_period'] * $day_in_seconds )68 if ( $diff <= $user['recent_period'] * $day_in_seconds ) 62 69 { 63 70 if ( !isset($page['get_icon_cache']['_icons_'] ) ) -
trunk/include/section_init.inc.php
r1866 r1876 558 558 FROM '.IMAGES_TABLE.' 559 559 INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id 560 WHERE date_available > \''. 561 date('Y-m-d', time() - 60*60*24*$user['recent_period']).'\' 560 WHERE 561 date_available >= SUBDATE( 562 CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY) 562 563 '.$forbidden.' 563 564 '.$conf['order_by'].'
Note: See TracChangeset
for help on using the changeset viewer.