diff options
Diffstat (limited to 'phpBB/posting.php')
| -rw-r--r-- | phpBB/posting.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index 599b7ddae7..17d426240b 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -844,7 +844,7 @@ if ($submit || $preview || $refresh) $sql = 'SELECT topic_type, forum_id FROM ' . TOPICS_TABLE . " WHERE topic_id = $topic_id"; - $result = $db->sql_query_limit($sql, 1); + $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); @@ -852,6 +852,21 @@ if ($submit || $preview || $refresh) { $to_forum_id = request_var('to_forum_id', 0); + if ($to_forum_id) + { + $sql = 'SELECT forum_type + FROM ' . FORUMS_TABLE . ' + WHERE forum_id = ' . $to_forum_id; + $result = $db->sql_query($sql); + $forum_type = (int) $db->sql_fetchfield('forum_type'); + $db->sql_freeresult($result); + + if ($forum_type != FORUM_POST || !$auth->acl_get('f_post', $to_forum_id)) + { + $to_forum_id = 0; + } + } + if (!$to_forum_id) { include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx); |
