From 92f077a4e98083ab8af38f91fa176399724d46b8 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Tue, 21 Oct 2014 22:32:57 +0200 Subject: [PATCH 1/4] [ticket/13193] Add link to post count in PMs PHPBB3-13193 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 1 + phpBB/styles/prosilver/template/ucp_pm_viewmessage.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 2f34fd64a5..81072ee081 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -213,6 +213,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) 'AUTHOR_AVATAR' => (isset($user_info['avatar'])) ? $user_info['avatar'] : '', 'AUTHOR_JOINED' => $user->format_date($user_info['user_regdate']), 'AUTHOR_POSTS' => (int) $user_info['user_posts'], + 'U_AUTHOR_POSTS' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$author_id&sr=posts") : '', 'CONTACT_USER' => $user->lang('CONTACT_USER', get_username_string('username', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username'])), 'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : ((isset($user_info['online']) && $user_info['online']) ? $user->img('icon_user_online', $user->lang['ONLINE']) : $user->img('icon_user_offline', $user->lang['OFFLINE'])), diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html index ddd95780d7..cd4146e329 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html @@ -29,7 +29,7 @@
{RANK_TITLE}
{RANK_IMG}
-
{L_POSTS}{L_COLON} {AUTHOR_POSTS}
+
{L_POSTS}{L_COLON} {AUTHOR_POSTS}
{L_JOINED}{L_COLON} {AUTHOR_JOINED}
From 0dcfcf585422f718ae3ec7368aa61d105b0402f7 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Tue, 21 Oct 2014 22:53:59 +0200 Subject: [PATCH 2/4] [ticket/13193] Add load_search config check PHPBB3-13193 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 81072ee081..68973e1049 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -213,7 +213,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) 'AUTHOR_AVATAR' => (isset($user_info['avatar'])) ? $user_info['avatar'] : '', 'AUTHOR_JOINED' => $user->format_date($user_info['user_regdate']), 'AUTHOR_POSTS' => (int) $user_info['user_posts'], - 'U_AUTHOR_POSTS' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$author_id&sr=posts") : '', + 'U_AUTHOR_POSTS' => ($auth->acl_get('u_search') && $config['load_search']) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$author_id&sr=posts") : '', 'CONTACT_USER' => $user->lang('CONTACT_USER', get_username_string('username', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username'])), 'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : ((isset($user_info['online']) && $user_info['online']) ? $user->img('icon_user_online', $user->lang['ONLINE']) : $user->img('icon_user_offline', $user->lang['OFFLINE'])), From 5581a30f58cbde1da41bf13d29e0cd6868dc44f8 Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Tue, 21 Oct 2014 23:12:00 +0200 Subject: [PATCH 3/4] [ticket/13193] Make template more readable PHPBB3-13193 --- phpBB/styles/prosilver/template/ucp_pm_viewmessage.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html index cd4146e329..2ad867ef8e 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewmessage.html @@ -29,7 +29,7 @@
{RANK_TITLE}
{RANK_IMG}
-
{L_POSTS}{L_COLON} {AUTHOR_POSTS}
+
{L_POSTS}{L_COLON} {AUTHOR_POSTS}{AUTHOR_POSTS}
{L_JOINED}{L_COLON} {AUTHOR_JOINED}
From 79274e904c19f119966ed027718db39104175bab Mon Sep 17 00:00:00 2001 From: Jakub Senko Date: Sun, 26 Oct 2014 08:44:21 +0100 Subject: [PATCH 4/4] [ticket/13193] Swap ternary condition members PHPBB3-13193 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 68973e1049..b2dc962f57 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -213,7 +213,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) 'AUTHOR_AVATAR' => (isset($user_info['avatar'])) ? $user_info['avatar'] : '', 'AUTHOR_JOINED' => $user->format_date($user_info['user_regdate']), 'AUTHOR_POSTS' => (int) $user_info['user_posts'], - 'U_AUTHOR_POSTS' => ($auth->acl_get('u_search') && $config['load_search']) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$author_id&sr=posts") : '', + 'U_AUTHOR_POSTS' => ($config['load_search'] && $auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$author_id&sr=posts") : '', 'CONTACT_USER' => $user->lang('CONTACT_USER', get_username_string('username', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username'])), 'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : ((isset($user_info['online']) && $user_info['online']) ? $user->img('icon_user_online', $user->lang['ONLINE']) : $user->img('icon_user_offline', $user->lang['OFFLINE'])),