From b4949675bfdd11212b9e38681b0ecce79d72ab24 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 20 Jul 2011 00:25:45 +0200 Subject: [PATCH 1/4] [ticket/8571] Also display age on memberlist/viewprofile when age is 0. PHPBB3-8571 --- phpBB/styles/prosilver/template/memberlist_view.html | 2 +- phpBB/styles/subsilver2/template/memberlist_view.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/styles/prosilver/template/memberlist_view.html b/phpBB/styles/prosilver/template/memberlist_view.html index 031bfec6ff..3398bb5e9e 100644 --- a/phpBB/styles/prosilver/template/memberlist_view.html +++ b/phpBB/styles/prosilver/template/memberlist_view.html @@ -28,7 +28,7 @@
{L_USER_IS_INACTIVE}:
{USER_INACTIVE_REASON}
{L_LOCATION}:
{LOCATION}
-
{L_AGE}:
{AGE}
+
{L_AGE}:
{AGE}
{L_OCCUPATION}:
{OCCUPATION}
{L_INTERESTS}:
{INTERESTS}
{L_USERGROUPS}:
diff --git a/phpBB/styles/subsilver2/template/memberlist_view.html b/phpBB/styles/subsilver2/template/memberlist_view.html index 9ef2b85878..0afa750c79 100644 --- a/phpBB/styles/subsilver2/template/memberlist_view.html +++ b/phpBB/styles/subsilver2/template/memberlist_view.html @@ -148,10 +148,10 @@ {L_LOCATION}: {LOCATION} - + {L_AGE}: - {AGE} - + {AGE} From 106cf14d27421b1e3b1c5af8ac79a8b1baa910f5 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 20 Jul 2011 00:26:52 +0200 Subject: [PATCH 2/4] [ticket/8571] Show 'Age: 0' on viewprofile when birthday is in the future. PHPBB3-8571 --- phpBB/memberlist.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 351759fcbd..8169ee7a3e 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -1697,7 +1697,7 @@ function show_profile($data, $user_notes_enabled = false, $warn_user_enabled = f $diff = ($diff < 0) ? 1 : 0; } - $age = (int) ($now['year'] - $bday_year - $diff); + $age = max(0, (int) ($now['year'] - $bday_year - $diff)); } } From 49c89023fcc946ed8c81181fabfea164128d8d5a Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 20 Jul 2011 00:53:28 +0200 Subject: [PATCH 3/4] [ticket/8571] Show age as 0 in birthday list when birthday is in the future. PHPBB3-8571 --- phpBB/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/index.php b/phpBB/index.php index 3b58646af0..91cbd326b9 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -99,7 +99,7 @@ if ($config['load_birthdays'] && $config['allow_birthdays']) if ($age = (int) substr($row['user_birthday'], -4)) { - $birthday_list .= ' (' . ($now['year'] - $age) . ')'; + $birthday_list .= ' (' . max(0, $now['year'] - $age) . ')'; } } $db->sql_freeresult($result); From b18b3363e95c8a626441969860facfbaf070b251 Mon Sep 17 00:00:00 2001 From: Callum Macrae Date: Fri, 19 Aug 2011 18:32:09 +0100 Subject: [PATCH 4/4] [ticket/9978] Added semicolons to JavaScript in overall_header. Semicolons have been added to the anonymous functions in the javascript in overall_header.html. This makes JSLint happier, and also makes the code easier to minify. PHPBB3-9978 --- phpBB/styles/prosilver/template/overall_header.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index e13c49b59a..a46c161542 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -68,7 +68,7 @@ { eval(onload_functions[i]); } - } + }; window.onunload = function() { @@ -76,7 +76,7 @@ { eval(onunload_functions[i]); } - } + }; // ]]>