mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Fixed bug #488816
git-svn-id: file:///svn/phpbb/trunk@1755 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
d6159b8b56
commit
80b31fa3ab
1 changed files with 5 additions and 5 deletions
|
@ -738,8 +738,7 @@ switch($mode)
|
||||||
$new_forum_id = $HTTP_POST_VARS['new_forum_id'];
|
$new_forum_id = $HTTP_POST_VARS['new_forum_id'];
|
||||||
$topic_time = time();
|
$topic_time = time();
|
||||||
|
|
||||||
$sql = "INSERT INTO " . TOPICS_TABLE . "
|
$sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type)
|
||||||
(topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type)
|
|
||||||
VALUES ('" . str_replace("\'", "''", $post_subject) . "', $first_poster, " . $topic_time . ", $new_forum_id, " . TOPIC_UNLOCKED . ", " . POST_NORMAL . ")";
|
VALUES ('" . str_replace("\'", "''", $post_subject) . "', $first_poster, " . $topic_time . ", $new_forum_id, " . TOPIC_UNLOCKED . ", " . POST_NORMAL . ")";
|
||||||
if(!$result = $db->sql_query($sql, BEGIN_TRANSACTION))
|
if(!$result = $db->sql_query($sql, BEGIN_TRANSACTION))
|
||||||
{
|
{
|
||||||
|
@ -761,13 +760,13 @@ switch($mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "UPDATE " . POSTS_TABLE . "
|
$sql = "UPDATE " . POSTS_TABLE . "
|
||||||
SET topic_id = $new_topic_id
|
SET topic_id = $new_topic_id, forum_id = $new_forum_id
|
||||||
WHERE post_id IN ($post_id_sql)";
|
WHERE post_id IN ($post_id_sql)";
|
||||||
}
|
}
|
||||||
else if( $HTTP_POST_VARS['split_type_beyond'] )
|
else if( $HTTP_POST_VARS['split_type_beyond'] )
|
||||||
{
|
{
|
||||||
$sql = "UPDATE " . POSTS_TABLE . "
|
$sql = "UPDATE " . POSTS_TABLE . "
|
||||||
SET topic_id = $new_topic_id
|
SET topic_id = $new_topic_id, forum_id = $new_forum_id
|
||||||
WHERE post_time >= $post_time
|
WHERE post_time >= $post_time
|
||||||
AND topic_id = $topic_id";
|
AND topic_id = $topic_id";
|
||||||
}
|
}
|
||||||
|
@ -779,13 +778,14 @@ switch($mode)
|
||||||
|
|
||||||
sync("topic", $new_topic_id);
|
sync("topic", $new_topic_id);
|
||||||
sync("topic", $topic_id);
|
sync("topic", $topic_id);
|
||||||
|
sync("forum", $new_forum_id);
|
||||||
sync("forum", $forum_id);
|
sync("forum", $forum_id);
|
||||||
|
|
||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
"META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">')
|
"META" => '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">')
|
||||||
);
|
);
|
||||||
|
|
||||||
$message = $lang['Topic_split'] . " " . sprintf($lang['Click_return_topic'], "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . "\">", "</a>");
|
$message = $lang['Topic_split'] . "<br /><br />" . sprintf($lang['Click_return_topic'], "<a href=\"" . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . "\">", "</a>");
|
||||||
message_die(GENERAL_MESSAGE, $message);
|
message_die(GENERAL_MESSAGE, $message);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue