1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00
git-svn-id: file:///svn/phpbb/trunk@7441 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M
2007-04-30 16:18:59 +00:00
parent 5538a812eb
commit ab9586a7f3
2 changed files with 19 additions and 7 deletions

View File

@@ -546,11 +546,12 @@ function mcp_move_topic($topic_ids)
$db->sql_freeresult($result);
$forum_sync_data[$forum_id]['forum_posts'] -= (int) $row_data['topic_posts'];
$forum_sync_data[$forum_id]['forum_topics'] -= (int) $topics_authed_moved;
$forum_sync_data[$forum_id]['forum_topics_real'] -= (int) $topics_moved;
$forum_sync_data[$to_forum_id]['forum_posts'] += (int) $row_data['topic_posts'];
$forum_sync_data[$forum_id]['forum_topics'] -= (int) $topics_moved;
$forum_sync_data[$to_forum_id]['forum_topics'] += (int) $topics_moved;
$forum_sync_data[$forum_id]['forum_topics_real'] -= (int) $topics_authed_moved;
$forum_sync_data[$to_forum_id]['forum_topics_real'] += (int) $topics_authed_moved;
$forum_sync_data[$to_forum_id]['forum_topics'] += (int) $topics_authed_moved;
$forum_sync_data[$to_forum_id]['forum_topics_real'] += (int) $topics_moved;
$db->sql_transaction('begin');
@@ -613,6 +614,7 @@ function mcp_move_topic($topic_ids)
$db->sql_query('INSERT INTO ' . TOPICS_TABLE . $db->sql_build_array('INSERT', $shadow));
$forum_sync_data[(int) $row['forum_id']]['forum_topics']++;
$forum_sync_data[(int) $row['forum_id']]['forum_topics_real']++;
}
}
unset($topic_data);
@@ -620,7 +622,7 @@ function mcp_move_topic($topic_ids)
$success_msg = (sizeof($topic_ids) == 1) ? 'TOPIC_MOVED_SUCCESS' : 'TOPICS_MOVED_SUCCESS';
// we must update the info, this post is being moved and is not the newest anymore
if ($forum_sync_data[$forum_id]['forum_last_post_id'] == $row_data['last_post_id'])
if ($forum_sync_data[$forum_id]['forum_last_post_id'] == $row_data['last_post_id'] && $row_data[''])
{
$forum_sync_data[$forum_id]['forum_last_post_id'] = 0;
$forum_sync_data[$forum_id]['forum_last_post_subject'] = '';