mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
- finally making the age calculation work [Bug #3582]
- replacing all occurances of L_NONE with a more specific string [Bug #3494] - a few corrections to html id attributes in the installer - using correct permission in mcp_report [Bug #2471] - allow deleting the avatar, when no upload method is enabled and hide the delete button if no avatar is set git-svn-id: file:///svn/phpbb/trunk@6241 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1072,7 +1072,18 @@ while ($row = $db->sql_fetchrow($result))
|
||||
|
||||
if ($bday_year)
|
||||
{
|
||||
$user_cache[$poster_id]['age'] = (int) ($today['year'] - $bday_year - (($today['month'] - $bday_month < 0) ? 1 : (($today['day'] - $bday_day < 0) ? 1 : 0)));
|
||||
$diff = $today['month'] - $bday_month;
|
||||
if ($diff == 0)
|
||||
{
|
||||
$diff = ($today['day'] - $bday_day < 0) ? 1 : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
$diff = ($diff < 0) ? 1 : 0;
|
||||
}
|
||||
|
||||
$age = (int) (date('Y', $time) - $bday_year - $diff);
|
||||
$user_cache[$poster_id]['age'] = (int) ($today['year'] - $bday_year - $diff);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user