diff options
author | Nils Adermann <naderman@naderman.de> | 2011-08-18 17:46:31 -0400 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2011-08-18 17:46:31 -0400 |
commit | d06dcd69e60bc3e6eafb4a11dfb1639fa4e4646b (patch) | |
tree | fc60cf66ef1544b6fc72ac1b5f57d0bf4ae1d923 /phpBB/index.php | |
parent | 9589fbffe4cdad9fa35df2597c21fc0753ed1d52 (diff) | |
parent | 6330153937b9321ce71226a7692403b64ad8e0c7 (diff) | |
download | forums-d06dcd69e60bc3e6eafb4a11dfb1639fa4e4646b.tar forums-d06dcd69e60bc3e6eafb4a11dfb1639fa4e4646b.tar.gz forums-d06dcd69e60bc3e6eafb4a11dfb1639fa4e4646b.tar.bz2 forums-d06dcd69e60bc3e6eafb4a11dfb1639fa4e4646b.tar.xz forums-d06dcd69e60bc3e6eafb4a11dfb1639fa4e4646b.zip |
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
Diffstat (limited to 'phpBB/index.php')
-rw-r--r-- | phpBB/index.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/phpBB/index.php b/phpBB/index.php index 419b66cfdb..63361c43c7 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -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); } |