mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-19 07:08:09 +01:00
[feature/soft-delete] Link to delete_topics module when the topic is deleted
PHPBB3-9567
This commit is contained in:
parent
f77a6eaab5
commit
6e93fee9d2
@ -220,12 +220,11 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||
|
||||
$topic_title = censor_text($row['topic_title']);
|
||||
|
||||
// @todo:
|
||||
$topic_unapproved = ($row['topic_visibility'] == ITEM_UNAPPROVED && $auth->acl_get('m_approve', $row['forum_id'])) ? true : false;
|
||||
$posts_unapproved = ($row['topic_visibility'] == ITEM_APPROVED && $row['topic_posts_unapproved'] && $auth->acl_get('m_approve', $row['forum_id'])) ? true : false;
|
||||
$topic_deleted = ($row['topic_visibility'] == ITEM_DELETED) ? true : false;
|
||||
$topic_deleted = $row['topic_visibility'] == ITEM_DELETED;
|
||||
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? $url . '&i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . '&t=' . $row['topic_id'] : '';
|
||||
$u_mcp_queue = (!$u_mcp_queue && $topic_deleted) ? $url . 'i=queue&mode=deleted_posts&t=' . $topic_id : $u_mcp_queue;
|
||||
$u_mcp_queue = (!$u_mcp_queue && $topic_deleted) ? $url . 'i=queue&mode=deleted_topics&t=' . $topic_id : $u_mcp_queue;
|
||||
|
||||
$topic_row = array(
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
|
@ -869,8 +869,9 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
|
||||
$topic_unapproved = ($row['topic_visibility'] == ITEM_UNAPPROVED && $auth->acl_get('m_approve', $forum_id)) ? true : false;
|
||||
$posts_unapproved = ($row['topic_visibility'] == ITEM_APPROVED && $row['topic_posts_unapproved'] && $auth->acl_get('m_approve', $forum_id)) ? true : false;
|
||||
$topic_deleted = ($row['topic_visibility'] == ITEM_DELETED) ? true : false;
|
||||
$topic_deleted = $row['topic_visibility'] == ITEM_DELETED;
|
||||
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$result_topic_id", true, $user->session_id) : '';
|
||||
$u_mcp_queue = (!$u_mcp_queue && $topic_deleted) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&mode=deleted_topics&t=$result_topic_id", true, $user->session_id) : '';
|
||||
|
||||
$row['topic_title'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#is', '<span class="posthilit">$1</span>', $row['topic_title']);
|
||||
|
||||
@ -906,7 +907,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
||||
'S_TOPIC_REPORTED' => (!empty($row['topic_reported']) && $auth->acl_get('m_report', $forum_id)) ? true : false,
|
||||
'S_TOPIC_UNAPPROVED' => $topic_unapproved,
|
||||
'S_POSTS_UNAPPROVED' => $posts_unapproved,
|
||||
'S_TOPIC_DELETED' => $topic_deleted,
|
||||
'S_TOPIC_DELETED' => $topic_deleted,
|
||||
|
||||
'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
|
||||
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||
|
@ -65,6 +65,7 @@
|
||||
<a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a> {searchresults.ATTACH_ICON_IMG}
|
||||
<!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED --><a href="{searchresults.U_MCP_QUEUE}">{searchresults.UNAPPROVED_IMG}</a> <!-- ENDIF -->
|
||||
<!-- IF searchresults.S_TOPIC_REPORTED --><a href="{searchresults.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><br />
|
||||
<!-- IF searchresults.DELETED_IMG --><a href="{searchresults.U_MCP_QUEUE}">{searchresults.DELETED_IMG}</a> <!-- ENDIF -->
|
||||
<!-- IF .searchresults.pagination -->
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
|
@ -144,7 +144,8 @@
|
||||
<dl class="icon {topicrow.TOPIC_IMG_STYLE}">
|
||||
<dt<!-- IF topicrow.TOPIC_ICON_IMG and S_TOPIC_ICONS --> style="background-image: url({T_ICONS_PATH}{topicrow.TOPIC_ICON_IMG}); background-repeat: no-repeat;"<!-- ENDIF --> title="{topicrow.TOPIC_FOLDER_IMG_ALT}"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF --><a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
|
||||
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF -->
|
||||
<!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF --><!-- IF topicrow.DELETED_IMG --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.DELETED_IMG}</a><!-- ENDIF --><br />
|
||||
<!-- IF topicrow.S_TOPIC_REPORTED --><a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a><!-- ENDIF -->
|
||||
<!-- IF topicrow.DELETED_IMG --><a href="{topicrow.U_MCP_QUEUE}">{topicrow.DELETED_IMG}</a><!-- ENDIF --><br />
|
||||
<!-- IF .topicrow.pagination -->
|
||||
<div class="pagination">
|
||||
<ul>
|
||||
|
@ -688,11 +688,10 @@ if (sizeof($topic_list))
|
||||
|
||||
$topic_unapproved = ($row['topic_visibility'] == ITEM_UNAPPROVED && $auth->acl_get('m_approve', $row['forum_id']));
|
||||
$posts_unapproved = ($row['topic_visibility'] == ITEM_APPROVED && $row['topic_posts_unapproved'] && $auth->acl_get('m_approve', $row['forum_id']));
|
||||
$topic_deleted = ($row['topic_visibility'] == ITEM_DELETED);
|
||||
$posts_deleted = ($row['topic_visibility'] == ITEM_DELETED && $row['topic_posts_softdeleted'] && $auth->acl_get('m_approve', $row['forum_id']));
|
||||
//@todo: this is still some kind of wrong!
|
||||
$topic_deleted = $row['topic_visibility'] == ITEM_DELETED;
|
||||
|
||||
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$topic_id", true, $user->session_id) : '';
|
||||
$u_mcp_queue = (!$u_mcp_queue && ($topic_deleted || $posts_deleted)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=deleted_posts&t=' . $topic_id, true, $user->session_id) : $u_mcp_queue;
|
||||
$u_mcp_queue = (!$u_mcp_queue && $topic_deleted) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=deleted_topics&t=' . $topic_id, true, $user->session_id) : $u_mcp_queue;
|
||||
|
||||
// Send vars to template
|
||||
$topic_row = array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user