mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-12 20:02:08 +02:00
[ticket/11829] Use report_closed to determine status in MCP report_details
Instead of using post_reported of the post or message_reported of the pm, use report_closed of the report itself to reliably determine whether this particular report is closed or not in the report_details view of the MCP. This fixes a bug where the report_details view would not show that the report shown was closed and display a "Close report" button that had no effect. PHPBB3-11829
This commit is contained in:
parent
f446afa06b
commit
77845e366e
@ -166,6 +166,7 @@ class mcp_pm_reports
|
||||
'S_CLOSE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=pm_reports&mode=pm_report_details&r=' . $report_id),
|
||||
'S_CAN_VIEWIP' => $auth->acl_getf_global('m_info'),
|
||||
'S_POST_REPORTED' => $pm_info['message_reported'],
|
||||
'S_REPORT_CLOSED' => $report['report_closed'],
|
||||
'S_USER_NOTES' => true,
|
||||
|
||||
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=pm_reports&mode=pm_report_details&r=' . $report_id),
|
||||
|
@ -192,6 +192,7 @@ class mcp_reports
|
||||
'S_POST_REPORTED' => $post_info['post_reported'],
|
||||
'S_POST_UNAPPROVED' => !$post_info['post_approved'],
|
||||
'S_POST_LOCKED' => $post_info['post_edit_locked'],
|
||||
'S_REPORT_CLOSED' => $report['report_closed'],
|
||||
'S_USER_NOTES' => true,
|
||||
|
||||
'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}") : '',
|
||||
|
@ -13,7 +13,7 @@
|
||||
<div class="postbody">
|
||||
<h3>{L_REPORT_REASON}: {REPORT_REASON_TITLE}</h3>
|
||||
<p class="author">{L_REPORTED} {L_POST_BY_AUTHOR} {REPORTER_FULL} « {REPORT_DATE}</p>
|
||||
<!-- IF not S_POST_REPORTED -->
|
||||
<!-- IF S_REPORT_CLOSED -->
|
||||
<p class="rules">{L_REPORT_CLOSED}</p>
|
||||
<!-- ENDIF -->
|
||||
<div class="content">
|
||||
@ -31,7 +31,7 @@
|
||||
<form method="post" id="mcp_report" action="{S_CLOSE_ACTION}">
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<!-- IF S_POST_REPORTED -->
|
||||
<!-- IF not S_REPORT_CLOSED -->
|
||||
<input class="button1" type="submit" value="{L_CLOSE_REPORT}" name="action[close]" />
|
||||
<!-- ENDIF -->
|
||||
<input class="button2" type="submit" value="{L_DELETE_REPORT}" name="action[delete]" />
|
||||
|
@ -28,7 +28,7 @@
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
<td class="cat" align="center" colspan="2"><!-- IF S_POST_REPORTED --><input class="btnmain" type="submit" value="{L_CLOSE_REPORT}" name="action[close]" /><!-- ELSE -->{L_REPORT_CLOSED}<!-- ENDIF --> <input class="btnlite" type="submit" value="{L_DELETE_REPORT}" name="action[delete]" /></td>
|
||||
<td class="cat" align="center" colspan="2"><!-- IF not S_REPORT_CLOSED --><input class="btnmain" type="submit" value="{L_CLOSE_REPORT}" name="action[close]" /><!-- ELSE -->{L_REPORT_CLOSED}<!-- ENDIF --> <input class="btnlite" type="submit" value="{L_DELETE_REPORT}" name="action[delete]" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user