diff options
author | rxu <rxu@mail.ru> | 2019-11-05 20:51:21 +0700 |
---|---|---|
committer | rxu <rxu@mail.ru> | 2019-11-05 20:51:21 +0700 |
commit | 0a8b2eb58eb7cde26cfd53d1c5c3c3eade39d385 (patch) | |
tree | 24245f113a889abb42fcca3f00db0a630e65ab93 /phpBB/posting.php | |
parent | 51f0c16b5f14490c286d5484756fd075f2dc207a (diff) | |
download | forums-0a8b2eb58eb7cde26cfd53d1c5c3c3eade39d385.tar forums-0a8b2eb58eb7cde26cfd53d1c5c3c3eade39d385.tar.gz forums-0a8b2eb58eb7cde26cfd53d1c5c3c3eade39d385.tar.bz2 forums-0a8b2eb58eb7cde26cfd53d1c5c3c3eade39d385.tar.xz forums-0a8b2eb58eb7cde26cfd53d1c5c3c3eade39d385.zip |
[ticket/16199] Init guest posting CAPTCHA only if guest posting is allowed
PHPBB3-16199
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r-- | phpBB/posting.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php index a0ddb9ff15..59616a2858 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -256,12 +256,6 @@ if ($mode == 'popup') $user->setup(array('posting', 'mcp', 'viewtopic'), $post_data['forum_style']); -if ($config['enable_post_confirm'] && !$user->data['is_registered']) -{ - $captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']); - $captcha->init(CONFIRM_POST); -} - // Use post_row values in favor of submitted ones... $forum_id = (!empty($post_data['forum_id'])) ? (int) $post_data['forum_id'] : (int) $forum_id; $topic_id = (!empty($post_data['topic_id'])) ? (int) $post_data['topic_id'] : (int) $topic_id; @@ -427,6 +421,12 @@ if (!$is_authed || !empty($error)) login_box('', $message); } +if ($config['enable_post_confirm'] && !$user->data['is_registered']) +{ + $captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']); + $captcha->init(CONFIRM_POST); +} + // Is the user able to post within this forum? if ($post_data['forum_type'] != FORUM_POST && in_array($mode, array('post', 'bump', 'quote', 'reply'))) { |