diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2006-11-21 18:15:53 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-11-21 18:15:53 +0000 |
| commit | ab9ec8064acb25d09d6d0edb93ecbe3b59541010 (patch) | |
| tree | 3ffb1cd5767a69f850daba6277f5cf93b91f1d9d /phpBB/includes/mcp/mcp_topic.php | |
| parent | 5be570b1f06f342a7f217679d102cdb7724905cf (diff) | |
| download | forums-ab9ec8064acb25d09d6d0edb93ecbe3b59541010.tar forums-ab9ec8064acb25d09d6d0edb93ecbe3b59541010.tar.gz forums-ab9ec8064acb25d09d6d0edb93ecbe3b59541010.tar.bz2 forums-ab9ec8064acb25d09d6d0edb93ecbe3b59541010.tar.xz forums-ab9ec8064acb25d09d6d0edb93ecbe3b59541010.zip | |
- fixing a bunch of bugs
- moved the install trigger error to sessions and also disabled it for those having DEBUG_EXTRA enabled.
i hope not having introduced too many new bugs.
git-svn-id: file:///svn/phpbb/trunk@6628 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/mcp/mcp_topic.php')
| -rw-r--r-- | phpBB/includes/mcp/mcp_topic.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index de9f7ac91b..ae4ed9850c 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -81,10 +81,11 @@ function mcp_topic_view($id, $mode, $action) $sql = 'SELECT u.username, u.user_colour, p.* FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u - WHERE ' . (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . " - p.topic_id = {$topic_id} + WHERE ' . (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . ' + p.topic_id = ' . $topic_id . ' ' . + ((!$auth->acl_get('m_approve', $topic_info['forum_id'])) ? ' AND p.post_approved = 1 ' : '') . ' AND p.poster_id = u.user_id - ORDER BY $sort_order_sql"; + ORDER BY ' . $sort_order_sql; $result = $db->sql_query_limit($sql, $posts_per_page, $start); $rowset = array(); @@ -141,8 +142,8 @@ function mcp_topic_view($id, $mode, $action) 'S_CHECKED' => ($post_id_list && in_array(intval($row['post_id']), $post_id_list)) ? true : false, 'U_POST_DETAILS' => "$url&i=$id&p={$row['post_id']}&mode=post_details", - 'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']), - 'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id'])) + 'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '', + 'U_MCP_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '') ); unset($rowset[$i]); @@ -198,6 +199,7 @@ function mcp_topic_view($id, $mode, $action) 'S_CAN_DELETE' => ($auth->acl_get('m_delete', $topic_info['forum_id'])) ? true : false, 'S_CAN_APPROVE' => ($has_unapproved_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false, 'S_CAN_LOCK' => ($auth->acl_get('m_lock', $topic_info['forum_id'])) ? true : false, + 'S_CAN_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? true : false, 'S_REPORT_VIEW' => ($action == 'reports') ? true : false, 'S_MERGE_VIEW' => ($action == 'merge') ? true : false, |
