1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-31 05:37:59 +01:00
git-svn-id: file:///svn/phpbb/trunk@4461 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2003-08-30 12:59:29 +00:00
parent 12b9f0b842
commit afc8c9ba25

View File

@ -681,14 +681,14 @@ if ($submit || $preview || $refresh)
// Check if we want to de-globalize the topic... and ask for new forum // Check if we want to de-globalize the topic... and ask for new forum
if ($topic_type != POST_GLOBAL) if ($topic_type != POST_GLOBAL)
{ {
$sql = 'SELECT forum_id $sql = 'SELECT topic_type, forum_id
FROM ' . TOPICS_TABLE . " FROM ' . TOPICS_TABLE . "
WHERE topic_id = $topic_id"; WHERE topic_id = $topic_id";
$result = $db->sql_query_limit($sql, 1); $result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result); $row = $db->sql_fetchrow($result);
if ((int)$row['forum_id'] == 0) if ($row && (int)$row['forum_id'] == 0 && $row['topic_type'] == POST_GLOBAL)
{ {
$to_forum_id = (!empty($_REQUEST['to_forum_id'])) ? (int) $_REQUEST['to_forum_id'] : 0; $to_forum_id = (!empty($_REQUEST['to_forum_id'])) ? (int) $_REQUEST['to_forum_id'] : 0;