From 5ce6035aad3c85b6dc30d523903d8b7c377f7a5a Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Fri, 10 Oct 2008 17:58:32 +0000 Subject: [PATCH] Merging r8993, r8994, r8995 git-svn-id: file:///svn/phpbb/trunk@8996 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_privmsgs.php | 21 ++++++++++++++----- phpBB/includes/mcp/mcp_reports.php | 2 +- .../prosilver/template/ucp_pm_history.html | 3 ++- .../subsilver2/template/ucp_pm_history.html | 2 +- phpBB/viewforum.php | 2 +- 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index 577e9954aa..f5980e55a6 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -1771,6 +1771,16 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode $message = censor_text($message); + $decoded_message = false; + + if ($in_post_mode && $auth->acl_get('u_sendpm') && $author_id != ANONYMOUS && $author_id != $user->data['user_id']) + { + $decoded_message = $message; + decode_message($decoded_message, $row['bbcode_uid']); + + $decoded_message = bbcode_nl2br($decoded_message); + } + if ($row['bbcode_bitfield']) { $bbcode->bbcode_second_pass($message, $row['bbcode_uid'], $row['bbcode_bitfield']); @@ -1789,16 +1799,17 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode } $template->assign_block_vars('history_row', array( - 'MESSAGE_AUTHOR_QUOTE' => (($in_post_mode && $auth->acl_get('u_sendpm') && $author_id != ANONYMOUS && $author_id != $user->data['user_id']) ? addslashes(get_username_string('username', $author_id, $row['username'], $row['user_colour'], $row['username'])) : ''), + 'MESSAGE_AUTHOR_QUOTE' => (($decoded_message) ? addslashes(get_username_string('username', $author_id, $row['username'], $row['user_colour'], $row['username'])) : ''), 'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $row['username'], $row['user_colour'], $row['username']), 'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $row['username'], $row['user_colour'], $row['username']), 'MESSAGE_AUTHOR' => get_username_string('username', $author_id, $row['username'], $row['user_colour'], $row['username']), 'U_MESSAGE_AUTHOR' => get_username_string('profile', $author_id, $row['username'], $row['user_colour'], $row['username']), - 'SUBJECT' => $subject, - 'SENT_DATE' => $user->format_date($row['message_time']), - 'MESSAGE' => $message, - 'FOLDER' => implode(', ', $row['folder']), + 'SUBJECT' => $subject, + 'SENT_DATE' => $user->format_date($row['message_time']), + 'MESSAGE' => $message, + 'FOLDER' => implode(', ', $row['folder']), + 'DECODED_MESSAGE' => $decoded_message, 'S_CURRENT_MSG' => ($row['msg_id'] == $msg_id), 'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false, diff --git a/phpBB/includes/mcp/mcp_reports.php b/phpBB/includes/mcp/mcp_reports.php index 1df0295224..df6c399abb 100644 --- a/phpBB/includes/mcp/mcp_reports.php +++ b/phpBB/includes/mcp/mcp_reports.php @@ -65,7 +65,7 @@ class mcp_reports { case 'report_details': - $user->add_lang(array('posting', 'viewforum')); + $user->add_lang(array('posting', 'viewforum', 'viewtopic')); $post_id = request_var('p', 0); diff --git a/phpBB/styles/prosilver/template/ucp_pm_history.html b/phpBB/styles/prosilver/template/ucp_pm_history.html index aaa4c53ac0..29e3a75c05 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_history.html +++ b/phpBB/styles/prosilver/template/ucp_pm_history.html @@ -19,7 +19,8 @@

class="current">{history_row.SUBJECT}

{history_row.MINI_POST_IMG} {L_SENT_AT}: {history_row.SENT_DATE}
{L_MESSAGE_BY_AUTHOR} {history_row.MESSAGE_AUTHOR_FULL}

-
{history_row.MESSAGE}
+
{history_row.MESSAGE}
+ diff --git a/phpBB/styles/subsilver2/template/ucp_pm_history.html b/phpBB/styles/subsilver2/template/ucp_pm_history.html index b880b8a72c..cb87d1892a 100644 --- a/phpBB/styles/subsilver2/template/ucp_pm_history.html +++ b/phpBB/styles/subsilver2/template/ucp_pm_history.html @@ -32,7 +32,7 @@ - +
{history_row.MESSAGE}
{history_row.MESSAGE}
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 2314794800..1d851edb3e 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -203,7 +203,7 @@ $s_watching_forum = array( 'is_watching' => false, ); -if (($config['email_enable'] || $config['jab_enable']) && $config['allow_forum_notify'] && $auth->acl_get('f_subscribe', $forum_id)) +if (($config['email_enable'] || $config['jab_enable']) && $config['allow_forum_notify'] && $forum_data['forum_type'] == FORUM_POST && $auth->acl_get('f_subscribe', $forum_id)) { $notify_status = (isset($forum_data['notify_status'])) ? $forum_data['notify_status'] : NULL; watch_topic_forum('forum', $s_watching_forum, $user->data['user_id'], $forum_id, 0, $notify_status);