1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-05 05:55:15 +02:00

Fixed moved topic in sync

git-svn-id: file:///svn/phpbb/trunk@907 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
gpolins 2001-08-19 22:09:33 +00:00
parent 35e78e31c9
commit 5f0c024f0c

View File

@ -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);