diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2010-03-11 00:38:56 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2011-04-07 13:45:44 +0200 |
commit | 3352141264993982215b714ac7a128854494ac1f (patch) | |
tree | 1fc4a4d85919402e957b1ce6448764aad791bc0d /phpBB/posting.php | |
parent | 7074d19c4087fab0e81a31bd806724d7eac7ef87 (diff) | |
download | forums-3352141264993982215b714ac7a128854494ac1f.tar forums-3352141264993982215b714ac7a128854494ac1f.tar.gz forums-3352141264993982215b714ac7a128854494ac1f.tar.bz2 forums-3352141264993982215b714ac7a128854494ac1f.tar.xz forums-3352141264993982215b714ac7a128854494ac1f.zip |
[ticket/9684] Remove code for global announcement in root-files
PHPBB3-9684
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r-- | phpBB/posting.php | 60 |
1 files changed, 2 insertions, 58 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index 41559056b9..2fcfd126eb 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -87,8 +87,7 @@ switch ($mode) $sql = 'SELECT f.*, t.* FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f WHERE t.topic_id = $topic_id - AND (f.forum_id = t.forum_id - OR f.forum_id = $forum_id)" . + AND f.forum_id = t.forum_id" . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1'); break; @@ -116,8 +115,7 @@ switch ($mode) WHERE p.post_id = $post_id AND t.topic_id = p.topic_id AND u.user_id = p.poster_id - AND (f.forum_id = t.forum_id - OR f.forum_id = $forum_id)" . + AND f.forum_id = t.forum_id" . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND p.post_approved = 1'); break; @@ -1005,60 +1003,6 @@ if ($submit || $preview || $refresh) // Store message, sync counters if (!sizeof($error) && $submit) { - // Check if we want to de-globalize the topic... and ask for new forum - if ($post_data['topic_type'] != POST_GLOBAL) - { - $sql = 'SELECT topic_type, forum_id - FROM ' . TOPICS_TABLE . " - WHERE topic_id = $topic_id"; - $result = $db->sql_query($sql); - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - if ($row && !$row['forum_id'] && $row['topic_type'] == POST_GLOBAL) - { - $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) || (!$auth->acl_get('m_approve', $to_forum_id) && !$auth->acl_get('f_noapprove', $to_forum_id))) - { - $to_forum_id = 0; - } - } - - if (!$to_forum_id) - { - include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx); - - $template->assign_vars(array( - 'S_FORUM_SELECT' => make_forum_select(false, false, false, true, true, true), - 'S_UNGLOBALISE' => true) - ); - - $submit = false; - $refresh = true; - } - else - { - if (!$auth->acl_get('f_post', $to_forum_id)) - { - // This will only be triggered if the user tried to trick the forum. - trigger_error('NOT_AUTHORISED'); - } - - $forum_id = $to_forum_id; - } - } - } - if ($submit) { // Lock/Unlock Topic |