diff options
author | Nils Adermann <naderman@naderman.de> | 2006-02-25 12:46:31 +0000 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2006-02-25 12:46:31 +0000 |
commit | 4bcfafdc64a8a77c67982604fc2f92513b05fa50 (patch) | |
tree | cee96b486033b5e112ddc1b6830d1b9b9f1b04a6 | |
parent | f95e730adf1d77e65cb4c408b49a62e2888b5f64 (diff) | |
download | forums-4bcfafdc64a8a77c67982604fc2f92513b05fa50.tar forums-4bcfafdc64a8a77c67982604fc2f92513b05fa50.tar.gz forums-4bcfafdc64a8a77c67982604fc2f92513b05fa50.tar.bz2 forums-4bcfafdc64a8a77c67982604fc2f92513b05fa50.tar.xz forums-4bcfafdc64a8a77c67982604fc2f92513b05fa50.zip |
- allow local moderators to properly use the mcp for more than one forum (mcp)
- automatically get a forum id for global topics if needed (mcp)
- allow linking to unapproved topics via a post id (viewtopic)
- use #p[post_id] anchor (mcp_post)
- use actions where appropriate (mcp_queue)
- added approve_details mode (mcp_queue)
- use new post details page (mcp_queue)
- adding missing lang keys for (dis)approval of topics/posts (mcp_queue)
- return to topic link (mcp_topic)
- some changes to follow the coding guidelines
git-svn-id: file:///svn/phpbb/trunk@5584 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/includes/mcp/mcp_front.php | 4 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_post.php | 4 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 125 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_topic.php | 3 | ||||
-rw-r--r-- | phpBB/install/schemas/schema_data.sql | 35 | ||||
-rw-r--r-- | phpBB/language/en/mcp.php | 13 | ||||
-rw-r--r-- | phpBB/mcp.php | 37 | ||||
-rw-r--r-- | phpBB/styles/subSilver/template/mcp_approve.html | 8 | ||||
-rw-r--r-- | phpBB/styles/subSilver/template/mcp_post.html | 2 | ||||
-rw-r--r-- | phpBB/styles/subSilver/template/mcp_queue.html | 4 | ||||
-rw-r--r-- | phpBB/styles/subSilver/template/mcp_topic.html | 3 | ||||
-rw-r--r-- | phpBB/viewtopic.php | 4 |
12 files changed, 139 insertions, 103 deletions
diff --git a/phpBB/includes/mcp/mcp_front.php b/phpBB/includes/mcp/mcp_front.php index c0d6ce19d5..7e8a0351ad 100644 --- a/phpBB/includes/mcp/mcp_front.php +++ b/phpBB/includes/mcp/mcp_front.php @@ -166,7 +166,7 @@ function mcp_front_view($id, $mode, $action) } // Latest 5 logs - $forum_list = get_forum_list(array('m_', 'a_general')); + $forum_list = get_forum_list(array('m_', 'a_')); if (!empty($forum_list)) { @@ -196,7 +196,7 @@ function mcp_front_view($id, $mode, $action) ); $template->assign_var('S_MCP_ACTION', $url); - make_jumpbox($url . '&mode=forum_view', 0, false, 'm_'); + make_jumpbox($url . '&i=main&mode=forum_view', 0, false, 'm_'); } ?>
\ No newline at end of file diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index a7422354b3..05758b9bf2 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -109,11 +109,11 @@ function mcp_post_details($id, $mode, $action) 'U_FIND_MEMBER' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=searchuser&form=mcp_chgposter&field=username", 'U_VIEW_PROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u=" . $post_info['user_id'], - 'U_MCP_USER_NOTES' => $auth->acl_gets('m_', 'a_') ? "{$phpbb_root_path}mcp.$phpEx$SID&i=notes&mode=user_notes&u=" . $post_info['user_id'] : '', + 'U_MCP_USER_NOTES' => $auth->acl_gets('m_', 'a_') ? "{$phpbb_root_path}mcp.$phpEx$SID&i=notes&mode=user_notes&u=" . $post_info['user_id'] : '', 'U_MCP_WARN_USER' => "{$phpbb_root_path}mcp.$phpEx$SID&i=warn&mode=warn_user&u=" . $post_info['user_id'], 'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? "{$phpbb_root_path}posting.$phpEx$SID&mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}" : '', - 'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], "<a href=\"{$phpbb_root_path}viewtopic.$phpEx$SID&p=$post_id#$post_id\">", '</a>'), + 'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], "<a href=\"{$phpbb_root_path}viewtopic.$phpEx$SID&p=$post_id#p$post_id\">", '</a>'), 'RETURN_FORUM' => sprintf($user->lang['RETURN_FORUM'], "<a href=\"{$phpbb_root_path}viewforum.$phpEx$SID&f={$post_info['forum_id']}&start={$start}\">", '</a>'), 'REPORTED_IMG' => $user->img('icon_reported', $user->lang['POST_REPORTED']), 'UNAPPROVED_IMG' => $user->img('icon_unapproved', $user->lang['POST_UNAPPROVED']), diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 1ec6101b5a..80d3672427 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -17,7 +17,7 @@ class mcp_queue { var $p_master; - + function mcp_main(&$p_master) { $this->p_master = &$p_master; @@ -26,14 +26,14 @@ class mcp_queue function main($id, $mode) { global $auth, $db, $user, $template; - global $config, $phpbb_root_path, $phpEx, $SID; + global $config, $phpbb_root_path, $phpEx, $SID, $action; include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx); $forum_id = request_var('f', 0); $start = request_var('start', 0); - switch ($mode) + switch ($action) { case 'approve': case 'disapprove': @@ -46,19 +46,22 @@ class mcp_queue trigger_error('NO_POST_SELECTED'); } - if ($mode == 'approve') + if ($action == 'approve') { - approve_post($post_id_list); + approve_post($post_id_list, $mode); } else { - disapprove_post($post_id_list); + disapprove_post($post_id_list, $mode); } - break; - + break; + } + + switch ($mode) + { case 'approve_details': - + $user->add_lang('posting'); $post_id = request_var('p', 0); @@ -102,20 +105,19 @@ class mcp_queue $template->assign_vars(array( 'S_MCP_QUEUE' => true, - 'S_APPROVE_ACTION' => "mcp.$phpEx$SID&i=queue&p=$post_id&f=$forum_id", - + 'S_APPROVE_ACTION' => "{$phpbb_root_path}mcp.$phpEx$SID&i=queue&p=$post_id&f=$forum_id", 'S_CAN_VIEWIP' => $auth->acl_get('m_info', $post_info['forum_id']), 'S_POST_REPORTED' => $post_info['post_reported'], 'S_POST_UNAPPROVED' => !$post_info['post_approved'], 'S_POST_LOCKED' => $post_info['post_edit_locked'], -// 'S_USER_NOTES' => ($post_info['user_notes']) ? true : false, - 'S_USER_WARNINGS' => ($post_info['user_warnings']) ? true : false, + 'S_USER_NOTES' => $auth->acl_gets('m_', 'a_') ? true : false, - 'U_VIEW_PROFILE' => "memberlist.$phpEx$SID&mode=viewprofile&u=" . $post_info['user_id'], - 'U_MCP_USERNOTES' => "mcp.$phpEx$SID&i=notes&mode=user_notes&u=" . $post_info['user_id'], - 'U_MCP_WARNINGS' => "mcp.$phpEx$SID&i=warnings&mode=view_user&u=" . $post_info['user_id'], + 'U_VIEW_PROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u=" . $post_info['user_id'], + 'U_MCP_USER_NOTES' => "{$phpbb_root_path}mcp.$phpEx$SID&i=notes&mode=user_notes&u=" . $post_info['user_id'], + 'U_MCP_WARN_USER' => "{$phpbb_root_path}mcp.$phpEx$SID&i=warn&mode=warn_user&u=" . $post_info['user_id'], 'U_EDIT' => ($auth->acl_get('m_edit', $post_info['forum_id'])) ? "{$phpbb_root_path}posting.$phpEx$SID&mode=edit&f={$post_info['forum_id']}&p={$post_info['post_id']}" : '', + 'RETURN_QUEUE' => sprintf($user->lang['RETURN_QUEUE'], "<a href=\"{$phpbb_root_path}mcp.$phpEx$SID&i=queue" . (($topic_id) ? '&mode=unapproved_topics' : '&mode=unapproved_posts') . "\">", '</a>'), 'REPORTED_IMG' => $user->img('icon_reported', $user->lang['POST_REPORTED']), 'UNAPPROVED_IMG' => $user->img('icon_unapproved', $user->lang['POST_UNAPPROVED']), 'EDIT_IMG' => $user->img('btn_edit', $user->lang['EDIT_POST']), @@ -131,7 +133,7 @@ class mcp_queue $this->tpl_name = 'mcp_post'; - break; + break; case 'unapproved_topics': case 'unapproved_posts': @@ -146,13 +148,13 @@ class mcp_queue { $forum_list[] = $row['forum_id']; } - + if (!$forum_list = implode(', ', $forum_list)) { trigger_error('NOT_MODERATOR'); } - $sql = 'SELECT SUM(forum_topics) as sum_forum_topics + $sql = 'SELECT SUM(forum_topics) as sum_forum_topics FROM ' . FORUMS_TABLE . " WHERE forum_id IN ($forum_list)"; $result = $db->sql_query($sql); @@ -263,12 +265,12 @@ class mcp_queue $s_checkbox = '<input type="checkbox" name="post_id_list[]" value="' . $row['post_id'] . '" />'; $template->assign_block_vars('postrow', array( - 'U_VIEWFORUM' => "viewforum.$phpEx$SID&f=" . $row['forum_id'], + 'U_VIEWFORUM' => "{$phpbb_root_path}viewforum.$phpEx$SID&f=" . $row['forum_id'], // Q: Why accessing the topic by a post_id instead of its topic_id? // A: To prevent the post from being hidden because of wrong encoding or different charset - 'U_VIEWTOPIC' => "viewtopic.$phpEx$SID&f=" . $row['forum_id'] . '&p=' . $row['post_id'] . (($mode == 'unapproved_posts') ? '#' . $row['post_id'] : ''), - 'U_VIEW_DETAILS'=> "mcp.$phpEx$SID&i=queue&start=$start&mode=approve_details&f={$forum_id}&p={$row['post_id']}", - 'U_VIEWPROFILE' => ($row['poster_id'] != ANONYMOUS) ? "memberlist.$phpEx$SID&mode=viewprofile&u={$row['poster_id']}" : '', + 'U_VIEWTOPIC' => "{$phpbb_root_path}viewtopic.$phpEx$SID&f=" . $row['forum_id'] . '&p=' . $row['post_id'] . (($mode == 'unapproved_posts') ? '#p' . $row['post_id'] : ''), + 'U_VIEW_DETAILS'=> "{$phpbb_root_path}mcp.$phpEx$SID&i=queue&start=$start&mode=approve_details&f={$forum_id}&p={$row['post_id']}", + 'U_VIEWPROFILE' => ($row['poster_id'] != ANONYMOUS) ? "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u={$row['poster_id']}" : '', 'FORUM_NAME' => $row['forum_name'], 'TOPIC_TITLE' => $row['topic_title'], @@ -286,13 +288,13 @@ class mcp_queue ); $this->tpl_name = 'mcp_queue'; - break; + break; } } } // Approve Post/Topic -function approve_post($post_id_list) +function approve_post($post_id_list, $mode) { global $db, $template, $user, $config; global $phpEx, $phpbb_root_path, $SID; @@ -306,28 +308,30 @@ function approve_post($post_id_list) $success_msg = ''; $s_hidden_fields = build_hidden_fields(array( + 'i' => 'queue', + 'mode' => $mode, 'post_id_list' => $post_id_list, 'f' => $forum_id, - 'mode' => 'approve', + 'action' => 'approve', 'redirect' => $redirect) ); if (confirm_box(true)) { $notify_poster = (isset($_REQUEST['notify_poster'])) ? true : false; - + $post_info = get_post_data($post_id_list, 'm_approve'); - + // If Topic -> total_topics = total_topics+1, total_posts = total_posts+1, forum_topics = forum_topics+1, forum_posts = forum_posts+1 // If Post -> total_posts = total_posts+1, forum_posts = forum_posts+1, topic_replies = topic_replies+1 - + $total_topics = $total_posts = $forum_topics = $forum_posts = 0; $topic_approve_sql = $topic_replies_sql = $post_approve_sql = $topic_id_list = array(); - + foreach ($post_info as $post_id => $post_data) { $topic_id_list[$post_data['topic_id']] = 1; - + // Topic or Post. ;) if ($post_data['topic_first_post_id'] == $post_id && $post_data['topic_last_post_id'] == $post_id) { @@ -359,7 +363,7 @@ function approve_post($post_id_list) $post_approve_sql[] = $post_id; } - + if (sizeof($topic_approve_sql)) { $sql = 'UPDATE ' . TOPICS_TABLE . ' @@ -398,7 +402,7 @@ function approve_post($post_id_list) $db->sql_query($sql); } - + if ($total_topics) { set_config('num_topics', $config['num_topics'] + $total_topics, true); @@ -413,21 +417,21 @@ function approve_post($post_id_list) update_post_information('topic', array_keys($topic_id_list)); update_post_information('forum', $forum_id); unset($topic_id_list); - + $messenger = new messenger(); // Notify Poster? if ($notify_poster) { $email_sig = str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']); - + foreach ($post_info as $post_id => $post_data) { if ($post_data['poster_id'] == ANONYMOUS) { continue; } - + $email_template = ($post_data['post_id'] == $post_data['topic_first_post_id'] && $post_data['post_id'] == $post_data['topic_last_post_id']) ? 'topic_approved' : 'post_approved'; $messenger->template($email_template, $post_data['user_lang']); @@ -443,8 +447,8 @@ function approve_post($post_id_list) 'POST_SUBJECT' => censor_text($post_data['post_subject']), 'TOPIC_TITLE' => censor_text($post_data['topic_title']), - 'U_VIEW_TOPIC' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t={$post_data['topic_id']}&e=0", - 'U_VIEW_POST' => generate_board_url() . "/viewtopic.$phpEx?f=$forum_id&t={$post_data['topic_id']}&p=$post_id&e=$post_id") + 'U_VIEW_TOPIC' => "{$phpbb_root_path}viewtopic.$phpEx?f=$forum_id&t={$post_data['topic_id']}&e=0", + 'U_VIEW_POST' => "{$phpbb_root_path}viewtopic.$phpEx?f=$forum_id&t={$post_data['topic_id']}&p=$post_id&e=$post_id") ); $messenger->send($post_data['user_notify_type']); @@ -456,7 +460,7 @@ function approve_post($post_id_list) // Send out normal user notifications $email_sig = str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']); - + foreach ($post_info as $post_id => $post_data) { if ($post_id == $post_data['topic_first_post_id'] && $post_id == $post_data['topic_last_post_id']) @@ -491,7 +495,7 @@ function approve_post($post_id_list) confirm_box(false, 'APPROVE_POST' . ((sizeof($post_id_list) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_approve.html'); } - $redirect = request_var('redirect', "index.$phpEx$SID"); + $redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx$SID"); if (strpos($redirect, '?') === false) { @@ -505,12 +509,12 @@ function approve_post($post_id_list) else { meta_refresh(3, $redirect); - trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="viewforum.' . $phpEx . $SID . '&f=' . $forum_id . '">', '</a>')); + trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], "<a href=\"{$phpbb_root_path}viewforum.$phpEx$SID&f=" . $forum_id . '">', '</a>')); } } // Disapprove Post/Topic -function disapprove_post($post_id_list) +function disapprove_post($post_id_list, $mode) { global $db, $template, $user, $config; global $phpEx, $phpbb_root_path, $SID; @@ -526,9 +530,11 @@ function disapprove_post($post_id_list) $success_msg = $additional_msg = ''; $s_hidden_fields = build_hidden_fields(array( + 'i' => 'queue', + 'mode' => $mode, 'post_id_list' => $post_id_list, 'f' => $forum_id, - 'mode' => 'disapprove', + 'action' => 'disapprove', 'redirect' => $redirect) ); @@ -536,8 +542,8 @@ function disapprove_post($post_id_list) if ($reason_id) { - $sql = 'SELECT reason_name - FROM ' . REASONS_TABLE . " + $sql = 'SELECT reason_name + FROM ' . REASONS_TABLE . " WHERE reason_id = $reason_id"; $result = $db->sql_query($sql); @@ -558,17 +564,17 @@ function disapprove_post($post_id_list) if (confirm_box(true)) { $post_info = get_post_data($post_id_list, 'm_approve'); - + // If Topic -> forum_topics_real -= 1 // If Post -> topic_replies_real -= 1 - + $forum_topics_real = 0; $topic_replies_real_sql = $post_disapprove_sql = $topic_id_list = array(); - + foreach ($post_info as $post_id => $post_data) { $topic_id_list[$post_data['topic_id']] = 1; - + // Topic or Post. ;) if ($post_data['topic_first_post_id'] == $post_id && $post_data['topic_last_post_id'] == $post_id) { @@ -591,7 +597,7 @@ function disapprove_post($post_id_list) $post_disapprove_sql[] = $post_id; } - + if ($forum_topics_real) { $sql = 'UPDATE ' . FORUMS_TABLE . " @@ -626,21 +632,21 @@ function disapprove_post($post_id_list) update_post_information('topic', array_keys($topic_id_list)); update_post_information('forum', $forum_id); unset($topic_id_list); - + $messenger = new messenger(); // Notify Poster? if ($notify_poster) { $email_sig = str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']); - + foreach ($post_info as $post_id => $post_data) { if ($post_data['poster_id'] == ANONYMOUS) { continue; } - + $email_template = ($post_data['post_id'] == $post_data['topic_first_post_id'] && $post_data['post_id'] == $post_data['topic_last_post_id']) ? 'topic_disapproved' : 'post_disapproved'; $messenger->template($email_template, $post_data['user_lang']); @@ -677,8 +683,8 @@ function disapprove_post($post_id_list) } else { - $sql = 'SELECT * - FROM ' . REASONS_TABLE . ' + $sql = 'SELECT * + FROM ' . REASONS_TABLE . ' ORDER BY reason_priority ASC'; $result = $db->sql_query($sql); @@ -709,7 +715,7 @@ function disapprove_post($post_id_list) confirm_box(false, 'DISAPPROVE_POST' . ((sizeof($post_id_list) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_approve.html'); } - $redirect = request_var('redirect', "index.$phpEx$SID"); + $redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx$SID"); if (strpos($redirect, '?') === false) { @@ -723,7 +729,7 @@ function disapprove_post($post_id_list) else { meta_refresh(3, "viewforum.$phpEx$SID&f=$forum_id"); - trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="viewforum.' . $phpEx . $SID . '&f=' . $forum_id . '">', '</a>')); + trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], "<a href=\"{$phpbb_root_path}viewforum.$phpEx$SID&f=" . $forum_id . '">', '</a>')); } } @@ -739,8 +745,9 @@ class mcp_queue_info 'title' => 'MCP_QUEUE', 'version' => '1.0.0', 'modes' => array( - 'unapproved_topics' => array('title' => 'MCP_QUEUE_UNAPPROVED_TOPICS', 'auth' => 'acl_m_approve'), - 'unapproved_posts' => array('title' => 'MCP_QUEUE_UNAPPROVED_POSTS', 'auth' => 'acl_m_approve'), + 'approve_details' => array('title' => 'MCP_QUEUE_APPROVE_DETAILS', 'auth' => 'acl_m_approve || aclf_m_approve'), + 'unapproved_topics' => array('title' => 'MCP_QUEUE_UNAPPROVED_TOPICS', 'auth' => 'acl_m_approve || aclf_m_approve'), + 'unapproved_posts' => array('title' => 'MCP_QUEUE_UNAPPROVED_POSTS', 'auth' => 'acl_m_approve || aclf_m_approve'), 'reports' => array('title' => 'MCP_QUEUE_REPORTS', 'auth' => 'acl_m_approve'), ), ); diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index 7109aecab7..317713625f 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -134,6 +134,7 @@ function mcp_topic_view($id, $mode, $action) 'POST_SUBJECT' => $post_subject, 'MESSAGE' => $message, 'POST_ID' => $row['post_id'], + 'RETURN_TOPIC' => sprintf($user->lang['RETURN_TOPIC'], "<a href=\"{$phpbb_root_path}viewtopic.$phpEx$SID&t=$topic_id\">", '</a>'), 'MINI_POST_IMG' => ($row['post_time'] > $user->data['user_lastvisit'] && $user->data['is_registered']) ? $user->img('icon_post_new', $user->lang['NEW_POST']) : $user->img('icon_post', $user->lang['POST']), @@ -142,7 +143,7 @@ function mcp_topic_view($id, $mode, $action) 'S_POST_UNAPPROVED' => ($row['post_approved']) ? false : true, 'U_POST_DETAILS' => "$url&i=$id&p={$row['post_id']}&mode=post_details", - 'U_MCP_APPROVE' => "{$phpbb_root_path}mcp.$phpEx$SID&i=queue&mode=approve&post_id_list[]=" . $row['post_id']) + 'U_MCP_APPROVE' => "{$phpbb_root_path}mcp.$phpEx$SID&i=queue&mode=unapproved_posts&action=approve&post_id_list[]=" . $row['post_id']) ); unset($rowset[$i]); diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 60bec5a97d..d70ee22bb8 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -592,23 +592,24 @@ INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (188, 1, 'permissions', 'acp', 1, 57, 333, 334, 'ACP_USERS_FORUM_PERMISSIONS', 'setting_user_local', 'acl_a_authusers && (acl_a_mauth || acl_a_fauth)'); # MCP -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (124, 1, '', 'mcp', 1, 0, 35, 44, 'MCP_MAIN', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (125, 1, '', 'mcp', 1, 0, 45, 50, 'MCP_NOTES', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (126, 1, '', 'mcp', 1, 0, 51, 58, 'MCP_QUEUE', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (127, 1, '', 'mcp', 1, 0, 59, 68, 'MCP_WARN', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (128, 1, 'main', 'mcp', 1, 124, 36, 37, 'MCP_MAIN_FRONT', 'front', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (129, 1, 'main', 'mcp', 1, 124, 38, 39, 'MCP_MAIN_FORUM_VIEW', 'forum_view', 'acl_m_,$id'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (130, 1, 'main', 'mcp', 1, 124, 40, 41, 'MCP_MAIN_TOPIC_VIEW', 'topic_view', 'acl_m_,$id'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (131, 1, 'main', 'mcp', 1, 124, 42, 43, 'MCP_MAIN_POST_DETAILS', 'post_details', 'acl_m_,$id'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (132, 1, 'notes', 'mcp', 1, 125, 46, 47, 'MCP_NOTES_FRONT', 'front', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (133, 1, 'notes', 'mcp', 1, 125, 48, 49, 'MCP_NOTES_USER', 'user_notes', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (134, 1, 'queue', 'mcp', 1, 126, 52, 53, 'MCP_QUEUE_UNAPPROVED_TOPICS', 'unapproved_topics', 'acl_m_approve'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (135, 1, 'queue', 'mcp', 1, 126, 54, 55, 'MCP_QUEUE_UNAPPROVED_POSTS', 'unapproved_posts', 'acl_m_approve'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (136, 1, 'queue', 'mcp', 1, 126, 56, 57, 'MCP_QUEUE_REPORTS', 'reports', 'acl_m_approve'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (137, 1, 'warn', 'mcp', 1, 127, 60, 61, 'MCP_WARN_FRONT', 'front', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (138, 1, 'warn', 'mcp', 1, 127, 62, 63, 'MCP_WARN_LIST', 'list', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (139, 1, 'warn', 'mcp', 1, 127, 64, 65, 'MCP_WARN_USER', 'warn_user', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (140, 1, 'warn', 'mcp', 1, 127, 66, 67, 'MCP_WARN_POST', 'warn_post', 'acl_m_,$id'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (124, 1, 1, '', 'mcp', 0, 37, 46, 'MCP_MAIN', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (125, 1, 1, '', 'mcp', 0, 47, 52, 'MCP_NOTES', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (126, 1, 1, '', 'mcp', 0, 53, 62, 'MCP_QUEUE', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (127, 1, 1, '', 'mcp', 0, 63, 72, 'MCP_WARN', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (128, 1, 1, 'main', 'mcp', 124, 38, 39, 'MCP_MAIN_FRONT', 'front', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (129, 1, 1, 'main', 'mcp', 124, 40, 41, 'MCP_MAIN_FORUM_VIEW', 'forum_view', 'acl_m_,$id'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (130, 1, 1, 'main', 'mcp', 124, 42, 43, 'MCP_MAIN_TOPIC_VIEW', 'topic_view', 'acl_m_,$id'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (131, 1, 1, 'main', 'mcp', 124, 44, 45, 'MCP_MAIN_POST_DETAILS', 'post_details', 'acl_m_,$id'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (132, 1, 1, 'notes', 'mcp', 125, 48, 49, 'MCP_NOTES_FRONT', 'front', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (133, 1, 1, 'notes', 'mcp', 125, 50, 51, 'MCP_NOTES_USER', 'user_notes', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (134, 1, 1, 'queue', 'mcp', 126, 54, 55, 'MCP_QUEUE_UNAPPROVED_TOPICS', 'unapproved_topics', 'acl_m_approve || aclf_m_approve'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (135, 1, 1, 'queue', 'mcp', 126, 56, 57, 'MCP_QUEUE_UNAPPROVED_POSTS', 'unapproved_posts', 'acl_m_approve || aclf_m_approve'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (136, 1, 1, 'queue', 'mcp', 126, 60, 61, 'MCP_QUEUE_REPORTS', 'reports', 'acl_m_approve'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (137, 1, 1, 'warn', 'mcp', 127, 64, 65, 'MCP_WARN_FRONT', 'front', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (138, 1, 1, 'warn', 'mcp', 127, 66, 67, 'MCP_WARN_LIST', 'list', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (139, 1, 1, 'warn', 'mcp', 127, 68, 69, 'MCP_WARN_USER', 'warn_user', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (140, 1, 1, 'warn', 'mcp', 127, 70, 71, 'MCP_WARN_POST', 'warn_post', 'acl_m_,$id'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (166, 1, 1, 'queue', 'mcp', 126, 58, 59, 'MCP_QUEUE_APPROVE_DETAILS', 'approve_details', 'acl_m_approve || aclf_m_approve'); # MSSQL IDENTITY phpbb_modules OFF # diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php index c45513f7d7..67494070e7 100644 --- a/phpBB/language/en/mcp.php +++ b/phpBB/language/en/mcp.php @@ -55,6 +55,11 @@ $lang = array_merge($lang, array( 'DELETE_TOPICS_CONFIRM' => 'Are you sure you want to delete these topics?', 'DELETE_TOPIC_CONFIRM' => 'Are you sure you want to delete this topic?', 'DISAPPROVE' => 'Disapprove', + 'DISAPPROVE_REASON' => 'Reason for disapproval', + 'DISAPPROVE_POST' => 'Disapprove Post', + 'DISAPPROVE_POST_CONFIRM' => 'Are you sure you want to disapprove this post?', + 'DISAPPROVE_POSTS' => 'Disapprove Posts', + 'DISAPPROVE_POSTS_CONFIRM' => 'Are you sure you want to disapprove the selected posts?', 'DISPLAY_LOG' => 'Display entries from previous', 'DISPLAY_OPTIONS' => 'Display options', @@ -154,6 +159,7 @@ $lang = array_merge($lang, array( 'MCP_QUEUE' => 'Moderation Queue', 'MCP_QUEUE_REPORTS' => 'Reports', + 'MCP_QUEUE_APPROVE_DETAILS' => 'Approve details', 'MCP_QUEUE_UNAPPROVED_POSTS' => 'Posts awaiting for approval', 'MCP_QUEUE_UNAPPROVED_TOPICS' => 'Topics awaiting for approval', 'MCP_VIEW_ALL' => 'View all (%s)', @@ -194,6 +200,7 @@ $lang = array_merge($lang, array( 'POSTER' => 'Poster', 'POSTS_APPROVED_SUCCESS'=> 'The selected posts have been approved', 'POSTS_DELETED_SUCCESS' => 'The selected posts have been successfully removed from the database', + 'POSTS_DISAPPROVED_SUCCESS'=> 'The selected posts have been disapproved', 'POSTS_LOCKED_SUCCESS' => 'The selected posts have been locked successfully', 'POSTS_MERGED_SUCCESS' => 'The selected posts have been merged', 'POSTS_UNLOCKED_SUCCESS'=> 'The selected posts have been unlocked successfully', @@ -201,6 +208,7 @@ $lang = array_merge($lang, array( 'POSTS_PER_PAGE_EXPLAIN'=> '(Set to 0 to view all posts)', 'POST_APPROVED_SUCCESS' => 'The selected post has been approved', 'POST_DELETED_SUCCESS' => 'The selected post has been successfully removed from the database', + 'POST_DISAPPROVED_SUCCESS' => 'The selected post has been disapproved', 'POST_DETAILS' => 'Post details', 'POST_LOCKED_SUCCESS' => 'Post locked successfully', 'POST_NOT_EXIST' => 'The post you requested does not exist', @@ -224,6 +232,7 @@ $lang = array_merge($lang, array( 'RETURN_MESSAGE' => 'Click %sHere%s to return to the message', 'RETURN_NEW_FORUM' => 'Click %sHere%s to return to the new forum', 'RETURN_NEW_TOPIC' => 'Click %sHere%s to return to the new topic', + 'RETURN_QUEUE' => 'Click %sHere%s to return to the queue', 'SELECT_ACTION' => 'Select desired action', 'SELECT_TOPIC' => 'Select topic', @@ -245,13 +254,15 @@ $lang = array_merge($lang, array( 'THIS_POST_IP' => 'IP for this post', 'TOPICS_APPROVED_SUCCESS' => 'The selected topics have been approved', 'TOPICS_DELETED_SUCCESS'=> 'The selected topics have been successfully removed from the database', + 'TOPICS_DISAPPROVED_SUCCESS' => 'The selected topics have been disapproved', 'TOPICS_FORKED_SUCCESS' => 'The selected topics have been copied successfully', 'TOPICS_LOCKED_SUCCESS' => 'The selected topics have been locked', 'TOPICS_MOVED_SUCCESS' => 'The selected topics have been moved successfully', 'TOPICS_RESYNC_SUCCESS' => 'The selected topics have been resynchronised', 'TOPICS_UNLOCKED_SUCCESS' => 'The selected topics have been unlocked', - 'TOPIC_APPROVED_SUCCESS'=> 'The selected topic has been approved', + 'TOPIC_APPROVED_SUCCESS' => 'The selected topic has been approved', 'TOPIC_DELETED_SUCCESS' => 'The selected topic has been successfully removed from the database', + 'TOPIC_DISAPPROVED_SUCCESS' => 'The selected topic has been disapproved', 'TOPIC_FORKED_SUCCESS' => 'The selected topic has been copied successfully', 'TOPIC_LOCKED_SUCCESS' => 'The selected topic has been locked', 'TOPIC_MOVED_SUCCESS' => 'The selected topic has been moved successfully', diff --git a/phpBB/mcp.php b/phpBB/mcp.php index f8c10a3709..7cea4384ca 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -99,18 +99,10 @@ if ($topic_id && !$forum_id) $forum_id = (int) $row['forum_id']; } -// If we do not have a forum id and the user is not a super moderator (global options are set to false, even if the user is able to moderator at least one forum -if (!$forum_id && !$auth->acl_get('m_')) +// If the user doesn't have any moderator powers (globally or locally) he can't access the mcp +if (!$forum_id && !$auth->acl_get('m_') && !$auth->acl_getf_global('m_')) { - $forum_list = get_forum_list('m_'); - - if (!sizeof($forum_list)) - { - trigger_error('MODULE_NOT_EXIST'); - } - - // We do not check all forums, only the first one should be sufficiant. - $forum_id = $forum_list[0]; + trigger_error('MODULE_NOT_EXIST'); } if($forum_id) @@ -160,7 +152,6 @@ else if (!$post_id) { $module->set_display('main', 'post_details', false); - $module->set_display('queue', 'approve_details', false); $module->set_display('warn', 'warn_post', false); } if (!$topic_id) @@ -168,6 +159,10 @@ if (!$topic_id) $module->set_display('main', 'topic_view', false); $module->set_display('logs', 'topic_logs', false); } +if (!$topic_id && !$post_id) +{ + $module->set_display('queue', 'approve_details', false); +} if (!$forum_id) { $module->set_display('main', 'forum_view', false); @@ -517,6 +512,24 @@ function check_ids(&$ids, $table, $sql_id, $acl_list = false) $forum_id = request_var('f', 0); } + if ($forum_id === 0) + { + // Determine first forum the user is able to read - for global announcements + $forum_ary = array_unique(array_keys($auth->acl_getf('!f_read', true))); + + $sql = 'SELECT forum_id + FROM ' . FORUMS_TABLE . ' + WHERE forum_type = ' . FORUM_POST; + if (sizeof($forum_ary)) + { + $sql .= ' AND forum_id NOT IN ( ' . implode(', ', $forum_ary) . ')'; + } + + $result = $db->sql_query_limit($sql, 1); + $forum_id = (int) $db->sql_fetchfield('forum_id', 0, $result); + $db->sql_freeresult($result); + } + if ($acl_list && !$auth->acl_get($acl_list, $forum_id)) { trigger_error('NOT_AUTHORIZED'); diff --git a/phpBB/styles/subSilver/template/mcp_approve.html b/phpBB/styles/subSilver/template/mcp_approve.html index e825a83acf..0413114355 100644 --- a/phpBB/styles/subSilver/template/mcp_approve.html +++ b/phpBB/styles/subSilver/template/mcp_approve.html @@ -21,12 +21,12 @@ <br /> <table border="0" width="90%" cellspacing="2" cellpadding="1"> <tr> - <td class="row2" width="22%"><b class="gen">{L_DISAPPROVE_REASON}:</b></td> - <td class="row2" width="78%"><select name="reason_id"><!-- BEGIN reason --><option value="{reason.ID}"<!-- IF reason.S_SELECTED --> selected="selected"<!-- ENDIF -->>{reason.DESCRIPTION}</option><!-- END reason --></select></td> + <td class="row1" width="22%"><b class="gen">{L_DISAPPROVE_REASON}:</b></td> + <td class="row1" width="78%"><select name="reason_id"><!-- BEGIN reason --><option value="{reason.ID}"<!-- IF reason.S_SELECTED --> selected="selected"<!-- ENDIF -->>{reason.DESCRIPTION}</option><!-- END reason --></select></td> </tr> <tr> - <td class="row2" valign="top"><span class="gen"><b>{L_MORE_INFO}:</b></span><br /><span class="gensmall">{L_CAN_LEAVE_BLANK}</span></td> - <td class="row2"><textarea class="post" style="width:500px" name="reason" rows="10" cols="40">{REASON}</textarea></td> + <td class="row1" valign="top"><span class="gen"><b>{L_MORE_INFO}:</b></span><br /><span class="gensmall">{L_CAN_LEAVE_BLANK}</span></td> + <td class="row1"><textarea class="post" style="width:500px" name="reason" rows="10" cols="40">{REASON}</textarea></td> </tr> </table> <br /> diff --git a/phpBB/styles/subSilver/template/mcp_post.html b/phpBB/styles/subSilver/template/mcp_post.html index 6a1d7e8147..ecd0bc7c80 100644 --- a/phpBB/styles/subSilver/template/mcp_post.html +++ b/phpBB/styles/subSilver/template/mcp_post.html @@ -33,7 +33,7 @@ </tr> <!-- IF S_POST_UNAPPROVED --> <tr> - <td class="cat" align="center" colspan="2"><input class="btnmain" type="submit" value="{L_APPROVE}" name="mode[approve]" /> <input class="btnlite" type="submit" value="{L_DISAPPROVE}" name="mode[disapprove]" /></td> + <td class="cat" align="center" colspan="2"><input class="btnmain" type="submit" value="{L_APPROVE}" name="action[approve]" /> <input class="btnlite" type="submit" value="{L_DISAPPROVE}" name="action[disapprove]" /></td> </tr> <input type="hidden" name="post_id_list[]" value="{POST_ID}" /> <!-- ENDIF --> diff --git a/phpBB/styles/subSilver/template/mcp_queue.html b/phpBB/styles/subSilver/template/mcp_queue.html index a027af34cf..5052d9ad98 100644 --- a/phpBB/styles/subSilver/template/mcp_queue.html +++ b/phpBB/styles/subSilver/template/mcp_queue.html @@ -15,7 +15,7 @@ </tr> <!-- BEGIN postrow --> <!-- IF postrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> - <td style="padding: 4px;"><p class="topictitle"><a href="{postrow.U_VIEWTOPIC}">{postrow.TOPIC_TITLE}</a></p><br /> + <td style="padding: 4px;"><p class="topictitle"><a href="{postrow.U_VIEWTOPIC}">{postrow.TOPIC_TITLE}</a></p> <span class="gensmall">{L_FORUM}: <a href="{postrow.U_VIEWFORUM}">{postrow.FORUM_NAME}</a></span></td> <td style="padding: 4px;" align="left" valign="top" nowrap="nowrap"><span class="gen"><!-- IF postrow.U_VIEWPROFILE --><a href="{postrow.U_VIEWPROFILE}">{postrow.POSTER}</a><!-- ELSE -->{postrow.POSTER}<!-- ENDIF --></span><br /> <span class="gensmall">[ <a href="{postrow.U_VIEW_DETAILS}">{L_VIEW_DETAILS}</a> ]</span></td> @@ -28,7 +28,7 @@ </tr> <!-- END postrow --> <tr> - <td class="cat" colspan="6" height="28" align="center"><input class="btnmain" type="submit" name="mode[approve]" value="{L_APPROVE}" /> <input class="btnlite" type="submit" name="mode[disapprove]" value="{L_DISAPPROVE}" /></td> + <td class="cat" colspan="6" height="28" align="center"><input class="btnmain" type="submit" name="action[approve]" value="{L_APPROVE}" /> <input class="btnlite" type="submit" name="action[disapprove]" value="{L_DISAPPROVE}" /></td> </tr> </form></table> diff --git a/phpBB/styles/subSilver/template/mcp_topic.html b/phpBB/styles/subSilver/template/mcp_topic.html index 6669f62985..181dbb3d6d 100644 --- a/phpBB/styles/subSilver/template/mcp_topic.html +++ b/phpBB/styles/subSilver/template/mcp_topic.html @@ -59,6 +59,9 @@ <th nowrap="nowrap">{L_MESSAGE}</th> <th nowrap="nowrap">{L_SELECT}</th> </tr> + <tr> + <td class="row3" colspan="3" align="center"><span class="gensmall">{RETURN_TOPIC}</span></td> + </tr> <!-- BEGIN postrow --> <!-- IF postrow.S_ROW_COUNT is even --> <tr class="row1"> diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index cb2a6cc6ff..f3de69429b 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -154,7 +154,7 @@ if (!$post_id) } else { - $join_sql = (!$post_id) ? "t.topic_id = $topic_id" : "p.post_id = $post_id" . ((!$auth->acl_get('m_approve', $forum_id)) ? ' AND p.post_approved = 1' : '') . ' AND t.topic_id = p.topic_id AND p2.topic_id = p.topic_id AND p2.post_approved = 1'; + $join_sql = "p.post_id = $post_id" . ((!$auth->acl_get('m_approve', $forum_id)) ? ' AND p.post_approved = 1' : '') . ' AND t.topic_id = p.topic_id AND p2.topic_id = p.topic_id' . ((!$auth->acl_get('m_approve', $forum_id)) ? ' AND p2.post_approved = 1' : ''); // This is for determining where we are (page) $join_sql .= ($sort_dir == 'd') ? " AND p2.post_id >= $post_id" : " AND p2.post_id <= $post_id"; @@ -1299,7 +1299,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'U_REPORT' => "{$phpbb_root_path}report.$phpEx$SID&p=" . $row['post_id'], 'U_MCP_REPORT' => ($auth->acl_gets('m_', 'a_', 'f_report', $forum_id)) ? "{$phpbb_root_path}mcp.$phpEx$SID&i=main&mode=post_details&p=" . $row['post_id'] : '', - 'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $forum_id)) ? "{$phpbb_root_path}mcp.$phpEx$SID&i=queue&mode=approve&post_id_list[]=" . $row['post_id'] : '', + 'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $forum_id)) ? "{$phpbb_root_path}mcp.$phpEx$SID&i=queue&mode=unapproved_posts&action=approve&post_id_list[]=" . $row['post_id'] : '', 'U_MINI_POST' => "{$phpbb_root_path}viewtopic.$phpEx$SID&p=" . $row['post_id'] . '#p' . $row['post_id'], 'U_NEXT_POST_ID' => ($i < $i_total && isset($rowset[$i + 1])) ? $rowset[$i + 1]['post_id'] : '', 'U_PREV_POST_ID' => $prev_post_id, |