diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-12-24 13:11:54 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-12-24 13:11:54 +0000 |
commit | ae1cb0316e6c19d62f0579e9cef52f11df081bcf (patch) | |
tree | d5e0900486aeb6ac91b957ce2ac47a4d55cdddc7 /phpBB/includes/mcp | |
parent | 9cc0b364bcc9473d0b1f4656db9008a55921918b (diff) | |
download | forums-ae1cb0316e6c19d62f0579e9cef52f11df081bcf.tar forums-ae1cb0316e6c19d62f0579e9cef52f11df081bcf.tar.gz forums-ae1cb0316e6c19d62f0579e9cef52f11df081bcf.tar.bz2 forums-ae1cb0316e6c19d62f0579e9cef52f11df081bcf.tar.xz forums-ae1cb0316e6c19d62f0579e9cef52f11df081bcf.zip |
some fixes today
- most important change is the consolidation of the display attachment functions; merging them together to have one function we need to call.
git-svn-id: file:///svn/phpbb/trunk@6803 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/mcp')
-rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 12 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_topic.php | 15 |
2 files changed, 21 insertions, 6 deletions
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 3fd7e6d856..48756c640e 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -50,11 +50,11 @@ class mcp_queue if ($action == 'approve') { - approve_post($post_id_list, $mode); + approve_post($post_id_list, 'queue', $mode); } else { - disapprove_post($post_id_list, $mode); + disapprove_post($post_id_list, 'queue', $mode); } break; @@ -372,7 +372,7 @@ class mcp_queue /** * Approve Post/Topic */ -function approve_post($post_id_list, $mode) +function approve_post($post_id_list, $id, $mode) { global $db, $template, $user, $config; global $phpEx, $phpbb_root_path; @@ -386,7 +386,7 @@ function approve_post($post_id_list, $mode) $success_msg = ''; $s_hidden_fields = build_hidden_fields(array( - 'i' => 'queue', + 'i' => $id, 'mode' => $mode, 'post_id_list' => $post_id_list, 'action' => 'approve', @@ -617,7 +617,7 @@ function approve_post($post_id_list, $mode) /** * Disapprove Post/Topic */ -function disapprove_post($post_id_list, $mode) +function disapprove_post($post_id_list, $id, $mode) { global $db, $template, $user, $config; global $phpEx, $phpbb_root_path; @@ -633,7 +633,7 @@ function disapprove_post($post_id_list, $mode) $success_msg = $additional_msg = ''; $s_hidden_fields = build_hidden_fields(array( - 'i' => 'queue', + 'i' => $id, 'mode' => $mode, 'post_id_list' => $post_id_list, 'action' => 'disapprove', diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index bc0d18afbd..4ad8efeda3 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -57,6 +57,21 @@ function mcp_topic_view($id, $mode, $action) $subject = $topic_info['topic_title']; } + // Approve posts? + if ($action == 'approve' && $auth->acl_get('m_approve', $topic_info['forum_id'])) + { + include($phpbb_root_path . 'includes/mcp/mcp_queue.' . $phpEx); + include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx); + include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); + + if (!sizeof($post_id_list)) + { + trigger_error('NO_POST_SELECTED'); + } + + approve_post($post_id_list, $id, $mode); + } + // Jumpbox, sort selects and that kind of things make_jumpbox($url . "&i=$id&mode=forum_view", $topic_info['forum_id'], false, 'm_'); $where_sql = ($action == 'reports') ? 'WHERE post_reported = 1 AND ' : 'WHERE'; |