mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 06:18:52 +00:00
Fixed bug #40325 – Friend/foe system displays posts made by foes while composing
Authorised by: acydburn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9305 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
f78594b59d
commit
49f0ab0ccd
7 changed files with 44 additions and 5 deletions
|
@ -90,6 +90,7 @@
|
||||||
<li>[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)</li>
|
<li>[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)</li>
|
||||||
<li>[Fix] Posts incremented for multiple approval of the same topic (Bug #40495 - Patch by TerraFrost)</li>
|
<li>[Fix] Posts incremented for multiple approval of the same topic (Bug #40495 - Patch by TerraFrost)</li>
|
||||||
<li>[Fix] Missing end " in quote bb tag deletes text (Bug #40565 - Patch by TerraFrost)</li>
|
<li>[Fix] Missing end " in quote bb tag deletes text (Bug #40565 - Patch by TerraFrost)</li>
|
||||||
|
<li>[Fix] Friend/foe system displays posts made by foes while composing (Bug #40325 - Patch by TerraFrost and Highway of Life)</li>
|
||||||
<li>[Fix] Missing read permission from calls to phpbb_chmod()</li>
|
<li>[Fix] Missing read permission from calls to phpbb_chmod()</li>
|
||||||
<li>[Fix] Correctly display future dates (Bug #38755)</li>
|
<li>[Fix] Correctly display future dates (Bug #38755)</li>
|
||||||
<li>[Change] Allow download of conflicting file for later reference in automatic updater</li>
|
<li>[Change] Allow download of conflicting file for later reference in automatic updater</li>
|
||||||
|
|
|
@ -963,13 +963,20 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = $db->sql_build_query('SELECT', array(
|
$sql = $db->sql_build_query('SELECT', array(
|
||||||
'SELECT' => 'u.username, u.user_id, u.user_colour, p.*',
|
'SELECT' => 'u.username, u.user_id, u.user_colour, p.*, z.friend, z.foe',
|
||||||
|
|
||||||
'FROM' => array(
|
'FROM' => array(
|
||||||
USERS_TABLE => 'u',
|
USERS_TABLE => 'u',
|
||||||
POSTS_TABLE => 'p',
|
POSTS_TABLE => 'p',
|
||||||
),
|
),
|
||||||
|
|
||||||
|
'LEFT_JOIN' => array(
|
||||||
|
array(
|
||||||
|
'FROM' => array(ZEBRA_TABLE => 'z'),
|
||||||
|
'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
|
||||||
'WHERE' => $db->sql_in_set('p.post_id', $post_list) . '
|
'WHERE' => $db->sql_in_set('p.post_id', $post_list) . '
|
||||||
AND u.user_id = p.poster_id'
|
AND u.user_id = p.poster_id'
|
||||||
));
|
));
|
||||||
|
@ -1060,6 +1067,9 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||||
|
|
||||||
$post_subject = censor_text($post_subject);
|
$post_subject = censor_text($post_subject);
|
||||||
|
|
||||||
|
$post_anchor = ($mode == 'post_review') ? 'ppr' . $row['post_id'] : 'pr' . $row['post_id'];
|
||||||
|
$u_show_post = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, "f=$forum_id&t=$topic_id&p={$row['post_id']}&view=show#p{$row['post_id']}");
|
||||||
|
|
||||||
$template->assign_block_vars($mode . '_row', array(
|
$template->assign_block_vars($mode . '_row', array(
|
||||||
'POST_AUTHOR_FULL' => get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
|
'POST_AUTHOR_FULL' => get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
|
||||||
'POST_AUTHOR_COLOUR' => get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
|
'POST_AUTHOR_COLOUR' => get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
|
||||||
|
@ -1067,6 +1077,9 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||||
'U_POST_AUTHOR' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
|
'U_POST_AUTHOR' => get_username_string('profile', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
|
||||||
|
|
||||||
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
|
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
|
||||||
|
'S_FRIEND' => ($row['friend']) ? true : false,
|
||||||
|
'S_IGNORE_POST' => ($row['foe']) ? true : false,
|
||||||
|
'L_IGNORE_POST' => ($row['foe']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), "<a href=\"{$u_show_post}\" onclick=\"dE('{$post_anchor}', 1); return false;\">", '</a>') : '',
|
||||||
|
|
||||||
'POST_SUBJECT' => $post_subject,
|
'POST_SUBJECT' => $post_subject,
|
||||||
'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['POST']),
|
'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['POST']),
|
||||||
|
|
|
@ -3,10 +3,16 @@
|
||||||
<p>{L_POST_REVIEW_EXPLAIN}</p>
|
<p>{L_POST_REVIEW_EXPLAIN}</p>
|
||||||
|
|
||||||
<!-- BEGIN post_review_row -->
|
<!-- BEGIN post_review_row -->
|
||||||
<div id="ppr{post_review_row.POST_ID}" class="post <!-- IF post_review_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF post_review_row.ONLINE_STATUS --> online<!-- ENDIF -->">
|
<!-- IF post_review_row.S_IGNORE_POST -->
|
||||||
|
<div class="post bg3 post-ignore">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner"><span class="corners-top"><span></span></span>
|
||||||
|
{post_review_row.L_IGNORE_POST}
|
||||||
|
<!-- ELSE -->
|
||||||
|
<div class="post <!-- IF post_review_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF --><!-- IF post_review_row.ONLINE_STATUS --> online<!-- ENDIF -->">
|
||||||
|
<div class="inner"><span class="corners-top"><span></span></span>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<div class="postbody">
|
<div class="postbody" id="ppr{post_review_row.POST_ID}">
|
||||||
<h3><a href="#ppr{post_review_row.POST_ID}">{post_review_row.POST_SUBJECT}</a></h3>
|
<h3><a href="#ppr{post_review_row.POST_ID}">{post_review_row.POST_SUBJECT}</a></h3>
|
||||||
<p class="author"><!-- IF S_IS_BOT -->{post_review_row.MINI_POST_IMG}<!-- ELSE --><a href="{post_review_row.U_MINI_POST}">{post_review_row.MINI_POST_IMG}</a><!-- ENDIF --> {L_POST_BY_AUTHOR}<strong> {post_review_row.POST_AUTHOR_FULL}</strong> » {post_review_row.POST_DATE}</p>
|
<p class="author"><!-- IF S_IS_BOT -->{post_review_row.MINI_POST_IMG}<!-- ELSE --><a href="{post_review_row.U_MINI_POST}">{post_review_row.MINI_POST_IMG}</a><!-- ENDIF --> {L_POST_BY_AUTHOR}<strong> {post_review_row.POST_AUTHOR_FULL}</strong> » {post_review_row.POST_DATE}</p>
|
||||||
<div class="content">{post_review_row.MESSAGE}</div>
|
<div class="content">{post_review_row.MESSAGE}</div>
|
||||||
|
|
|
@ -6,8 +6,15 @@
|
||||||
|
|
||||||
<div id="topicreview">
|
<div id="topicreview">
|
||||||
<!-- BEGIN topic_review_row -->
|
<!-- BEGIN topic_review_row -->
|
||||||
|
|
||||||
|
<!-- IF topic_review_row.S_IGNORE_POST -->
|
||||||
|
<div class="post bg3 post-ignore">
|
||||||
|
<div class="inner"><span class="corners-top"><span></span></span>
|
||||||
|
{topic_review_row.L_IGNORE_POST}
|
||||||
|
<!-- ELSE -->
|
||||||
<div class="post <!-- IF topic_review_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
|
<div class="post <!-- IF topic_review_row.S_ROW_COUNT is odd -->bg1<!-- ELSE -->bg2<!-- ENDIF -->">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner"><span class="corners-top"><span></span></span>
|
||||||
|
<!-- ENDIF -->
|
||||||
|
|
||||||
<div class="postbody" id="pr{topic_review_row.POST_ID}">
|
<div class="postbody" id="pr{topic_review_row.POST_ID}">
|
||||||
<!-- IF topic_review_row.POSTER_QUOTE and topic_review_row.DECODED_MESSAGE -->
|
<!-- IF topic_review_row.POSTER_QUOTE and topic_review_row.DECODED_MESSAGE -->
|
||||||
|
|
|
@ -280,6 +280,10 @@ div[class].topic-actions {
|
||||||
border-bottom-width: 0;
|
border-bottom-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-ignore .postbody {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
/* Content container styles
|
/* Content container styles
|
||||||
----------------------------------------*/
|
----------------------------------------*/
|
||||||
.content {
|
.content {
|
||||||
|
@ -750,4 +754,4 @@ dl.pmlist dt textarea {
|
||||||
dl.pmlist dd {
|
dl.pmlist dd {
|
||||||
margin-left: 61% !important;
|
margin-left: 61% !important;
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
}
|
}
|
|
@ -19,6 +19,9 @@
|
||||||
<!-- BEGIN post_review_row -->
|
<!-- BEGIN post_review_row -->
|
||||||
|
|
||||||
<!-- IF post_review_row.S_ROW_COUNT is even --> <tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
<!-- IF post_review_row.S_ROW_COUNT is even --> <tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||||
|
<!-- IF post_review_row.S_IGNORE_POST -->
|
||||||
|
<td colspan="2">{post_review_row.L_IGNORE_POST}</td>
|
||||||
|
<!-- ELSE -->
|
||||||
|
|
||||||
<td rowspan="2" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><a id="pr{post_review_row.POST_ID}"></a>
|
<td rowspan="2" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><a id="pr{post_review_row.POST_ID}"></a>
|
||||||
<table width="150" cellspacing="0" cellpadding="4" border="0">
|
<table width="150" cellspacing="0" cellpadding="4" border="0">
|
||||||
|
@ -82,6 +85,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
<!-- ENDIF -->
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
|
<td class="spacer" colspan="2" height="1"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
|
||||||
|
|
|
@ -15,6 +15,9 @@
|
||||||
|
|
||||||
<!-- IF topic_review_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
<!-- IF topic_review_row.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF -->
|
||||||
|
|
||||||
|
<!-- IF topic_review_row.S_IGNORE_POST -->
|
||||||
|
<td colspan="2">{topic_review_row.L_IGNORE_POST}</td>
|
||||||
|
<!-- ELSE -->
|
||||||
<td rowspan="2" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><a id="pr{topic_review_row.POST_ID}"></a>
|
<td rowspan="2" align="{S_CONTENT_FLOW_BEGIN}" valign="top"><a id="pr{topic_review_row.POST_ID}"></a>
|
||||||
<table width="150" cellspacing="0">
|
<table width="150" cellspacing="0">
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -81,6 +84,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
<!-- ENDIF -->
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="spacer" colspan="2"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
|
<td class="spacer" colspan="2"><img src="images/spacer.gif" alt="" width="1" height="1" /></td>
|
||||||
|
@ -91,4 +95,4 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<br clear="all" />
|
<br clear="all" />
|
Loading…
Add table
Reference in a new issue