aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorgpolins <gpolins@users.sourceforge.net>2001-08-19 22:09:33 +0000
committergpolins <gpolins@users.sourceforge.net>2001-08-19 22:09:33 +0000
commit5f0c024f0c4f9f6b88e2e3ac94d7c5a74e956672 (patch)
tree86a741fabdd40de8ef069365c12e549dc1c78af2 /phpBB
parent35e78e31c9115bee7fe57be8d519cdbf9ddf03ea (diff)
downloadforums-5f0c024f0c4f9f6b88e2e3ac94d7c5a74e956672.tar
forums-5f0c024f0c4f9f6b88e2e3ac94d7c5a74e956672.tar.gz
forums-5f0c024f0c4f9f6b88e2e3ac94d7c5a74e956672.tar.bz2
forums-5f0c024f0c4f9f6b88e2e3ac94d7c5a74e956672.tar.xz
forums-5f0c024f0c4f9f6b88e2e3ac94d7c5a74e956672.zip
Fixed moved topic in sync
git-svn-id: file:///svn/phpbb/trunk@907 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 1b65481e8e..5d37cc724a 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -526,7 +526,7 @@ function sync($type, $id)
switch($type)
{
case 'forum':
- $sql = "SELECT max(post_id) AS last_post FROM ".POSTS_TABLE." WHERE forum_id = $id";
+ $sql = "SELECT max(p.post_id) AS last_post FROM ".POSTS_TABLE." p, ".TOPICS_TABLE." t WHERE p.forum_id = $id AND p.topic_id = t.topic_id AND t.topic_status <> ".TOPIC_MOVED;
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not get post ID", "Error", __LINE__, __FILE__, $sql);