aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-02-06 03:43:25 +0000
committerLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-02-06 03:43:25 +0000
commitbb30927fdf4ec139f9b621d17320656498d339c0 (patch)
tree6f3ef2ecdf55a3fbb929ecb3cabc4bf219bde320
parent44cd06a722a4ba8ea56e6f0fe68a1cd256d12a01 (diff)
downloadforums-bb30927fdf4ec139f9b621d17320656498d339c0.tar
forums-bb30927fdf4ec139f9b621d17320656498d339c0.tar.gz
forums-bb30927fdf4ec139f9b621d17320656498d339c0.tar.bz2
forums-bb30927fdf4ec139f9b621d17320656498d339c0.tar.xz
forums-bb30927fdf4ec139f9b621d17320656498d339c0.zip
Tweaking around the merge interface
git-svn-id: file:///svn/phpbb/trunk@3459 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/mcp.php31
1 files changed, 17 insertions, 14 deletions
diff --git a/phpBB/mcp.php b/phpBB/mcp.php
index b6cac689c2..b06f45cc2e 100644
--- a/phpBB/mcp.php
+++ b/phpBB/mcp.php
@@ -163,6 +163,18 @@ foreach ($_POST['post_id_list'] as $p_id)
}
}
+$selected_post_ids = array();
+if (!empty($_GET['post_id_list']))
+{
+ $len = $_GET['post_id_list']{0};
+ for ($i = 1; $i < strlen($_GET['post_id_list']); $i += $len)
+ {
+ $short = substr($_GET['post_id_list'], $i, $len);
+ $selected_post_ids[] = (string) base_convert($short, 36, 10);
+ $post_id_list[] = base_convert($short, 36, 10);
+ }
+}
+
$topic_id_sql = implode(', ', $topic_id_list);
$post_id_sql = implode(', ', $post_id_list);
@@ -299,23 +311,24 @@ $mcp_url .= ($forum_id) ? '&amp;f=' . $forum_id : '';
$mcp_url .= ($topic_id) ? '&amp;t=' . $topic_id : '';
$mcp_url .= ($post_id) ? '&amp;p=' . $post_id : '';
$mcp_url .= ($start) ? '&amp;start=' . $start : '';
+$url_extra = (!empty($_GET['post_id_list'])) ? '&amp;post_id_list=' . htmlspecialchars($_GET['post_id_list']) : '';
$return_mcp = '<br /><br />' . sprintf($user->lang['Click_return_modcp'], '<a href="' . $mcp_url . '">', '</a>');
if ($forum_id)
{
- $tabs['forum_view'] = $mcp_url . '&amp;mode=forum_view';
+ $tabs['forum_view'] = $mcp_url . '&amp;mode=forum_view' . $url_extra;
}
if ($topic_id)
{
- $tabs['topic_view'] = $mcp_url . '&amp;mode=topic_view';
+ $tabs['topic_view'] = $mcp_url . '&amp;mode=topic_view' . $url_extra;
}
if ($post_id)
{
- $tabs['post_view'] = $mcp_url . '&amp;mode=post_view';
+ $tabs['post_view'] = $mcp_url . '&amp;mode=post_view' . $url_extra;
}
if (!empty($_GET['post_id_list']))
{
- $tabs['merge'] = $mcp_url . '&amp;mode=merge&amp;post_id_list=' . htmlspecialchars($_GET['post_id_list']);
+ $tabs['merge'] = $mcp_url . '&amp;mode=merge' . $url_extra;
}
if (count($forum_id_list) == 1 && !$forum_info['forum_postable'])
@@ -408,16 +421,6 @@ switch ($mode)
));
$is_first_post = TRUE;
- $selected_post_ids = array();
- if (!empty($_GET['post_id_list']))
- {
- $len = $_GET['post_id_list']{0};
- for ($i = 1; $i < strlen($_GET['post_id_list']); $i += $len)
- {
- $short = substr($_GET['post_id_list'], $i, $len);
- $selected_post_ids[] = (string) base_convert($short, 36, 10);
- }
- }
$sql = "SELECT u.username, p.*, pt.*
FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt