aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2008-10-10 17:38:17 +0000
committerChris Smith <toonarmy@phpbb.com>2008-10-10 17:38:17 +0000
commitb86722d509042d548de593aa56750f5ca9b432c2 (patch)
treefb0d81a4daf82ce1305348b8898d034812f7f5d8
parentb30abf821f20bd0f6be108466b0bbe225347dd0c (diff)
downloadforums-b86722d509042d548de593aa56750f5ca9b432c2.tar
forums-b86722d509042d548de593aa56750f5ca9b432c2.tar.gz
forums-b86722d509042d548de593aa56750f5ca9b432c2.tar.bz2
forums-b86722d509042d548de593aa56750f5ca9b432c2.tar.xz
forums-b86722d509042d548de593aa56750f5ca9b432c2.zip
Fix regression introduced in r8951 #34985
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8993 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/functions_privmsgs.php21
-rw-r--r--phpBB/styles/prosilver/template/ucp_pm_history.html3
-rw-r--r--phpBB/styles/subsilver2/template/ucp_pm_history.html2
3 files changed, 19 insertions, 7 deletions
diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php
index cbfa8414aa..4926cabf2c 100644
--- a/phpBB/includes/functions_privmsgs.php
+++ b/phpBB/includes/functions_privmsgs.php
@@ -1773,6 +1773,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']);
@@ -1791,16 +1801,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/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 @@
<h3><a href="{history_row.U_VIEW_MESSAGE}" <!-- IF history_row.S_CURRENT_MSG -->class="current"<!-- ENDIF -->>{history_row.SUBJECT}</a></h3>
<p class="author<!-- IF history_row.S_CURRENT_MSG --> current<!-- ENDIF -->">{history_row.MINI_POST_IMG} {L_SENT_AT}: <strong>{history_row.SENT_DATE}</strong><br />
{L_MESSAGE_BY_AUTHOR} {history_row.MESSAGE_AUTHOR_FULL}</p>
- <div class="content<!-- IF history_row.S_CURRENT_MSG --> current<!-- ENDIF -->" id="message_{history_row.MSG_ID}">{history_row.MESSAGE}</div>
+ <div class="content<!-- IF history_row.S_CURRENT_MSG --> current<!-- ENDIF -->">{history_row.MESSAGE}</div>
+ <div id="message_{history_row.MSG_ID}" style="display: none;">{history_row.DECODED_MESSAGE}</div>
</div>
<span class="corners-bottom"><span></span></span></div>
diff --git a/phpBB/styles/subsilver2/template/ucp_pm_history.html b/phpBB/styles/subsilver2/template/ucp_pm_history.html
index b880b8a72c..f1bb6ae70f 100644
--- a/phpBB/styles/subsilver2/template/ucp_pm_history.html
+++ b/phpBB/styles/subsilver2/template/ucp_pm_history.html
@@ -32,7 +32,7 @@
<td valign="top">
<table width="100%" cellspacing="0" cellpadding="2">
<tr>
- <td><div class="postbody" id="message_{history_row.MSG_ID}">{history_row.MESSAGE}</div></td>
+ <td><div class="postbody">{history_row.MESSAGE}</div><div id="message_{history_row.MSG_ID}">{history_row.DECODED_MESSAGE}</div></td>
</tr>
</table>
</td>