diff options
| author | Nils Adermann <naderman@naderman.de> | 2006-08-06 17:25:29 +0000 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2006-08-06 17:25:29 +0000 |
| commit | 8b079894f3e528c9ffe652f8f3a041599d8cbdc0 (patch) | |
| tree | 04efd5c2cf97e16a3540b9ff5c09a1944cf4b963 /phpBB/memberlist.php | |
| parent | 4af44652aced7c601cdfeff93dc03e6672e8b2c3 (diff) | |
| download | forums-8b079894f3e528c9ffe652f8f3a041599d8cbdc0.tar forums-8b079894f3e528c9ffe652f8f3a041599d8cbdc0.tar.gz forums-8b079894f3e528c9ffe652f8f3a041599d8cbdc0.tar.bz2 forums-8b079894f3e528c9ffe652f8f3a041599d8cbdc0.tar.xz forums-8b079894f3e528c9ffe652f8f3a041599d8cbdc0.zip | |
- 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
Diffstat (limited to 'phpBB/memberlist.php')
| -rw-r--r-- | phpBB/memberlist.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 225d2927d3..2ace920917 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1331,7 +1331,17 @@ function show_profile($data) { $time = time() + $user->timezone + $user->dst; - $age = (int) (date('Y', $time) - $bday_year - ((date('n', $time) - $bday_month < 0) ? 1 : ((date('j', $time) - $bday_day < 0) ? 1 : 0))); + $diff = date('n', $time) - $bday_month; + if ($diff == 0) + { + $diff = (date('j', $time) - $bday_day < 0) ? 1 : 0; + } + else + { + $diff = ($diff < 0) ? 1 : 0; + } + + $age = (int) (date('Y', $time) - $bday_year - $diff); } } |
