diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2008-09-02 06:36:24 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2008-09-02 06:36:24 +0000 |
| commit | 5c4870fcce2f2a71b74166947939461bea90eac2 (patch) | |
| tree | 5afb093e27c11146d7933f510ba284cda6d7becd /phpBB/posting.php | |
| parent | 7f813a9ef65fbf3dd24565e3e199ab67b38df70c (diff) | |
| download | forums-5c4870fcce2f2a71b74166947939461bea90eac2.tar forums-5c4870fcce2f2a71b74166947939461bea90eac2.tar.gz forums-5c4870fcce2f2a71b74166947939461bea90eac2.tar.bz2 forums-5c4870fcce2f2a71b74166947939461bea90eac2.tar.xz forums-5c4870fcce2f2a71b74166947939461bea90eac2.zip | |
Fix one design failure in phpBB3. Do not count non-approved posts to the user_posts. Before, a user was able to circumvent basically any protection based on post counts.
At the same time implement the queue_trigger feature.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8805 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/posting.php')
| -rw-r--r-- | phpBB/posting.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index 2754a9cac0..64e26766b3 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -999,10 +999,9 @@ if ($submit || $preview || $refresh) } $redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message); - $post_need_approval = (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) ? true : false; - // If the post need approval we will wait a lot longer. - if ($post_need_approval) + // Check the permissions for post approval, as well as the queue trigger where users are put on approval with a post count lower than specified. Moderators are not affected. + if (($config['enable_queue_trigger'] && $user->data['user_posts'] < $config['queue_trigger_posts'] && !$auth->acl_get('m_approve', $data['forum_id'])) || !$auth->acl_get('f_noapprove', $data['forum_id'])) { meta_refresh(10, $redirect_url); $message = ($mode == 'edit') ? $user->lang['POST_EDITED_MOD'] : $user->lang['POST_STORED_MOD']; |
