diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-05-09 21:40:06 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-05-09 21:40:06 +0000 |
commit | 0d12b14ded503ad1709fc36b5a477daffc2022d2 (patch) | |
tree | 5fec253664891b34983d5d436f353feed788b8cc /phpBB | |
parent | 6b6cea7aaf3838fb04e40034d4de4a29868f54fe (diff) | |
download | forums-0d12b14ded503ad1709fc36b5a477daffc2022d2.tar forums-0d12b14ded503ad1709fc36b5a477daffc2022d2.tar.gz forums-0d12b14ded503ad1709fc36b5a477daffc2022d2.tar.bz2 forums-0d12b14ded503ad1709fc36b5a477daffc2022d2.tar.xz forums-0d12b14ded503ad1709fc36b5a477daffc2022d2.zip |
add possibility to return to post after approval (if approving one post) - very helpful if using approval links from within topics.
git-svn-id: file:///svn/phpbb/trunk@7520 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index f42101067e..b3f7e158b2 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -627,6 +627,12 @@ function approve_post($post_id_list, $id, $mode) user_notification('reply', $post_data['post_subject'], $post_data['topic_title'], $post_data['forum_name'], $post_data['forum_id'], $post_data['topic_id'], $post_id); } } + + if (sizeof($post_id_list) == 1) + { + $post_data = $post_info[$post_id_list[0]]; + $post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f={$post_data['forum_id']}&t={$post_data['topic_id']}&p={$post_data['post_id']}") . '#p' . $post_data['post_id']; + } unset($post_info); if ($total_topics) @@ -658,7 +664,15 @@ function approve_post($post_id_list, $id, $mode) else { meta_refresh(3, $redirect); - trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], "<a href=\"$redirect\">", '</a>')); + + // If approving one post, also give links back to post... + $add_message = ''; + if (sizeof($post_id_list) == 1 && !empty($post_url)) + { + $add_message = '<br /><br />' . sprintf($user->lang['RETURN_POST'], '<a href="' . $post_url . '">', '</a>'); + } + + trigger_error($user->lang[$success_msg] . '<br /><br />' . sprintf($user->lang['RETURN_PAGE'], "<a href=\"$redirect\">", '</a>') . $add_message); } } |