aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2004-05-26 20:56:21 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2004-05-26 20:56:21 +0000
commit87b3f56c329ddd45bf15f38120b0cfd51de0b43a (patch)
tree1cb4dc2fb0edd3bf2d81fd88f2abfef68863d434
parent88028d3f2aa69534ba94793e26ff0d773d6ce038 (diff)
downloadforums-87b3f56c329ddd45bf15f38120b0cfd51de0b43a.tar
forums-87b3f56c329ddd45bf15f38120b0cfd51de0b43a.tar.gz
forums-87b3f56c329ddd45bf15f38120b0cfd51de0b43a.tar.bz2
forums-87b3f56c329ddd45bf15f38120b0cfd51de0b43a.tar.xz
forums-87b3f56c329ddd45bf15f38120b0cfd51de0b43a.zip
only minor things... blabla
git-svn-id: file:///svn/phpbb/trunk@4900 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/mcp/mcp_main.php4
-rw-r--r--phpBB/includes/mcp/mcp_queue.php42
2 files changed, 27 insertions, 19 deletions
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index d9b88eca67..44e1808f1c 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -441,7 +441,7 @@ class mcp_main extends mcp
'S_SELECT_TOPIC' => ($mode == 'merge_select' && $row['topic_id'] != $this->topic_id) ? TRUE : FALSE,
'U_SELECT_TOPIC' => $this->url . '&amp;mode=merge&amp;to_topic_id=' . $row['topic_id'] . $this->selected_ids,
- 'U_MCP_QUEUE' => $this->url . '&amp;mode=approve&amp;t=' . $row['topic_id'],
+ 'U_MCP_QUEUE' => $this->url . '&amp;i=queue&amp;mode=approve&amp;t=' . $row['topic_id'],
'U_MCP_REPORT' => $this->url . '&amp;mode=reports&amp;t=' . $row['topic_id'],
'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $row['forum_id']) && $row['topic_attachment']) ? $user->img('icon_attach', sprintf($user->lang['TOTAL_ATTACHMENTS'], $row['topic_attachment'])) : '',
@@ -860,7 +860,7 @@ class mcp_main extends mcp
'S_POST_UNAPPROVED' => ($row['post_approved']) ? FALSE : TRUE,
'U_POST_DETAILS' => "mcp.$phpEx$SID&amp;f=" . $row['forum_id'] . '&amp;t=' . $row['topic_id'] . '&amp;p=' . $row['post_id'] . '&amp;mode=post_details',
- 'U_APPROVE' => "mcp.$phpEx$SID&amp;mode=approve&amp;p=" . $row['post_id']
+ 'U_APPROVE' => "mcp.$phpEx$SID&amp;i=queue&amp;mode=approve&amp;p=" . $row['post_id']
));
unset($rowset[$i]);
diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php
index dc647d5896..a8a4579ae1 100644
--- a/phpBB/includes/mcp/mcp_queue.php
+++ b/phpBB/includes/mcp/mcp_queue.php
@@ -132,7 +132,8 @@ class mcp_queue extends mcp
$db->sql_query($sql);
// Now resync everything
- sync('topic', 'topic_id', $topic_id_list, TRUE, TRUE);
+ sync('topic', 'topic_id', $topic_id_list, true, true);
+ sync('forum', 'forum_id', $this->forum_id, true, true);
// Back to... whatever
if ($this->quickmod)
@@ -178,26 +179,33 @@ class mcp_queue extends mcp
$row_num[$row['post_id']] = $i++;
}
- $sql = 'SELECT f.forum_id, f.forum_name, t.topic_id, t.topic_title, p.post_id, p.post_username, p.poster_id, p.post_time, u.username
- FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . " u
- WHERE p.post_id IN (" . implode(', ', $post_ids) . ")
- AND t.topic_id = p.topic_id
- AND f.forum_id = p.forum_id
- AND u.user_id = p.poster_id";
-
- $result = $db->sql_query($sql);
- $post_data = $rowset = array();
- while ($row = $db->sql_fetchrow($result))
+ if (sizeof($post_ids))
{
- $post_data[$row['post_id']] = $row;
- }
- $db->sql_freeresult($result);
+ $sql = 'SELECT f.forum_id, f.forum_name, t.topic_id, t.topic_title, p.post_id, p.post_username, p.poster_id, p.post_time, u.username
+ FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f, ' . TOPICS_TABLE . ' t, ' . USERS_TABLE . " u
+ WHERE p.post_id IN (" . implode(', ', $post_ids) . ")
+ AND t.topic_id = p.topic_id
+ AND f.forum_id = p.forum_id
+ AND u.user_id = p.poster_id";
+
+ $result = $db->sql_query($sql);
+ $post_data = $rowset = array();
+ while ($row = $db->sql_fetchrow($result))
+ {
+ $post_data[$row['post_id']] = $row;
+ }
+ $db->sql_freeresult($result);
- foreach ($post_ids as $post_id)
+ foreach ($post_ids as $post_id)
+ {
+ $rowset[] = $post_data[$post_id];
+ }
+ unset($post_data, $post_ids);
+ }
+ else
{
- $rowset[] = $post_data[$post_id];
+ $rowset = array();
}
- unset($post_data, $post_ids);
}
else
{