diff options
author | James Atkinson <thefinn@users.sourceforge.net> | 2001-07-13 16:42:20 +0000 |
---|---|---|
committer | James Atkinson <thefinn@users.sourceforge.net> | 2001-07-13 16:42:20 +0000 |
commit | 8e49899bce210323dae4626138d5465b68c4fc58 (patch) | |
tree | cc597f982541d172b82ecd16fa0b3fb653c8743b /phpBB/modcp.php | |
parent | df799b8a16e25ffd39f018d6e131fc5c94157c8e (diff) | |
download | forums-8e49899bce210323dae4626138d5465b68c4fc58.tar forums-8e49899bce210323dae4626138d5465b68c4fc58.tar.gz forums-8e49899bce210323dae4626138d5465b68c4fc58.tar.bz2 forums-8e49899bce210323dae4626138d5465b68c4fc58.tar.xz forums-8e49899bce210323dae4626138d5465b68c4fc58.zip |
Split posts works, split beyond this post does not. Still needs interface work as well
git-svn-id: file:///svn/phpbb/trunk@649 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/modcp.php')
-rw-r--r-- | phpBB/modcp.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/phpBB/modcp.php b/phpBB/modcp.php index 2869545c43..303ad9e5d4 100644 --- a/phpBB/modcp.php +++ b/phpBB/modcp.php @@ -434,7 +434,7 @@ switch($mode) $posts = $HTTP_POST_VARS['preform_op']; - $sql = "SELECT poster_id FROM ".POSTS_TABLE." WHERE post_id = ".$posts[0]; + $sql = "SELECT poster_id, topic_id FROM ".POSTS_TABLE." WHERE post_id = ".$posts[0]; if(!$result = $db->sql_query($sql, BEGIN_TRANSACTION)) { message_die(GENERAL_ERROR, "Could not get post information", "Error", __LINE__, __FILE__, $sql); @@ -442,7 +442,8 @@ switch($mode) $post_rowset = $db->sql_fetchrowset($result); $first_poster = $post_rowset[0]['poster_id']; - + $topic_id = $post_rowset[0]['topic_id']; + $subject = trim(strip_tags(htmlspecialchars(stripslashes($HTTP_POST_VARS['subject'])))); if(empty($subject)) { @@ -488,11 +489,11 @@ switch($mode) else { sync("topic", $topic_id); - if(!$result = $db->sql_query($sql - - $next_page = "viewtopic.$phpEx?".POST_TOPIC_URL."=$new_topic_id"; - $return_message = $lang['to_return_topic']; - message_die(GENERAL_MESSAGE, $lang['Topic_split'] . "<br />" . "<a href=\"".append_sid($next_page)."\">". $lang['Click'] . " " . $lang['Here'] ."</a> " . $return_message); + sync("forum", $forum_id); + $next_page = "viewtopic.$phpEx?".POST_TOPIC_URL."=$new_topic_id"; + $return_message = $lang['to_return_topic']; + message_die(GENERAL_MESSAGE, $lang['Topic_split'] . "<br />" . "<a href=\"".append_sid($next_page)."\">". $lang['Click'] . " " . $lang['Here'] ."</a> " . $return_message); + } } } } |