mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/8571] Show age as 0 in birthday list when birthday is in the future. [ticket/8571] Show 'Age: 0' on viewprofile when birthday is in the future. [ticket/8571] Also display age on memberlist/viewprofile when age is 0. Conflicts: phpBB/index.php
This commit is contained in:
@@ -98,7 +98,7 @@ if ($config['load_birthdays'] && $config['allow_birthdays'])
|
||||
{
|
||||
$birthday_username = get_username_string('full', $row['user_id'], $row['username'], $row['user_colour']);
|
||||
$birthday_year = (int) substr($row['user_birthday'], -4);
|
||||
$birthday_age = ($birthday_year) ? $now['year'] - $birthday_year : '';
|
||||
$birthday_age = ($birthday_year) ? max(0, $now['year'] - $birthday_year) : '';
|
||||
|
||||
$template->assign_block_vars('birthdays', array(
|
||||
'USERNAME' => $birthday_username,
|
||||
@@ -106,7 +106,10 @@ if ($config['load_birthdays'] && $config['allow_birthdays'])
|
||||
));
|
||||
|
||||
// For 3.0 compatibility
|
||||
$birthday_list[] = $birthday_username . (($birthday_year) ? ' (' . $birthday_age . ')' : '');
|
||||
if ($age = (int) substr($row['user_birthday'], -4))
|
||||
{
|
||||
$birthday_list[] = $birthday_username . (($birthday_year) ? ' (' . $birthday_age . ')' : '');
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
Reference in New Issue
Block a user