mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-06 01:42:29 +02:00
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
This commit is contained in:
@@ -55,10 +55,17 @@ function get_icon($date, $is_child_date = false)
|
||||
return '';
|
||||
}
|
||||
|
||||
$diff = time() - $unixtime;
|
||||
if (!isset($page['get_icon_cache']['unix_timestamp']))
|
||||
{
|
||||
// Use MySql date in order to standardize all recent "actions/queries"
|
||||
list($page['get_icon_cache']['unix_timestamp']) =
|
||||
mysql_fetch_array(pwg_query('select UNIX_TIMESTAMP(CURRENT_DATE)'));
|
||||
}
|
||||
|
||||
$diff = $page['get_icon_cache']['unix_timestamp'] - $unixtime;
|
||||
$day_in_seconds = 24*60*60;
|
||||
$page['get_icon_cache'][$date] = false;
|
||||
if ( $diff < $user['recent_period'] * $day_in_seconds )
|
||||
if ( $diff <= $user['recent_period'] * $day_in_seconds )
|
||||
{
|
||||
if ( !isset($page['get_icon_cache']['_icons_'] ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user