diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2004-05-26 20:56:21 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2004-05-26 20:56:21 +0000 |
commit | 87b3f56c329ddd45bf15f38120b0cfd51de0b43a (patch) | |
tree | 1cb4dc2fb0edd3bf2d81fd88f2abfef68863d434 /phpBB/includes/mcp/mcp_queue.php | |
parent | 88028d3f2aa69534ba94793e26ff0d773d6ce038 (diff) | |
download | forums-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
Diffstat (limited to 'phpBB/includes/mcp/mcp_queue.php')
-rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 42 |
1 files changed, 25 insertions, 17 deletions
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 { |