mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Change bug #39505 - Pm history only shows pms of the receipts you currently reply to
Authorised by: acydburn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9677 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
f4fb682bbb
commit
d39d8481cf
2 changed files with 19 additions and 1 deletions
|
@ -148,6 +148,7 @@
|
|||
<li>[Change] Ability to fetch moderators with get_moderators() even if load_moderators setting is off. (Bug #35955)</li>
|
||||
<li>[Change] Add WAI-ARIA landmarks for easier accessibility to the prosilver template (Bug #45715 - Patch by MarcoZ)</li>
|
||||
<li>[Change] "Post details" links with image in MCP. (Bug #39845 - Patch by leviatan21)</li>
|
||||
<li>[Change] Pm history only shows pms of the receipts you currently reply to (Bug #39505 - Patch by nickvergessen)</li>
|
||||
<li>[Change] Add quote-button for own pm's in pm-history (Bug #37285 - Patch by nickvergessen)</li>
|
||||
<li>[Feature] Add confirmation for deactivating styles (Bug #14304 - Patch by leviatan21)</li>
|
||||
<li>[Feature] Add language selection on the registration terms page (Bug #15085 - Patch by leviatan21)</li>
|
||||
|
|
|
@ -1691,12 +1691,29 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
|
|||
{
|
||||
global $db, $user, $config, $template, $phpbb_root_path, $phpEx, $auth, $bbcode;
|
||||
|
||||
// Select all receipts and the author from the pm we currently view, to only display their pm-history
|
||||
$sql = 'SELECT author_id, user_id
|
||||
FROM ' . PRIVMSGS_TO_TABLE . "
|
||||
WHERE msg_id = $msg_id
|
||||
AND folder_id <> " . PRIVMSGS_HOLD_BOX;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$recipients = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$recipients[] = $row['user_id'];
|
||||
$recipients[] = $row['author_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$recipients = array_unique($recipients);
|
||||
|
||||
// Get History Messages (could be newer)
|
||||
$sql = 'SELECT t.*, p.*, u.*
|
||||
FROM ' . PRIVMSGS_TABLE . ' p, ' . PRIVMSGS_TO_TABLE . ' t, ' . USERS_TABLE . ' u
|
||||
WHERE t.msg_id = p.msg_id
|
||||
AND p.author_id = u.user_id
|
||||
AND t.folder_id NOT IN (' . PRIVMSGS_NO_BOX . ', ' . PRIVMSGS_HOLD_BOX . ")
|
||||
AND t.folder_id NOT IN (' . PRIVMSGS_NO_BOX . ', ' . PRIVMSGS_HOLD_BOX . ')
|
||||
AND ' . $db->sql_in_set('t.author_id', $recipients) . "
|
||||
AND t.user_id = $user_id";
|
||||
|
||||
if (!$message_row['root_level'])
|
||||
|
|
Loading…
Add table
Reference in a new issue