diff --git a/phpBB/config/default/container/services_captcha.yml b/phpBB/config/default/container/services_captcha.yml index f3f9476f86..8e9d829b47 100644 --- a/phpBB/config/default/container/services_captcha.yml +++ b/phpBB/config/default/container/services_captcha.yml @@ -17,6 +17,11 @@ services: core.captcha.plugins.incomplete: class: phpbb\captcha\plugins\incomplete shared: false + arguments: + - '@config' + - '@template' + - '%core.root_path%' + - '%core.php_ext%' calls: - [ set_name, [ core.captcha.plugins.incomplete ] ] tags: diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 3d90f15742..75964fde88 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -136,6 +136,7 @@ $lang = array_merge($lang, array( 'CONFIRMATION' => 'Confirmation of registration', 'CONFIRM_CHANGES' => 'Confirm changes', 'CONFIRM_EXPLAIN' => 'To prevent automated registrations the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.', + 'CONFIRM_INCOMPLETE' => 'To prevent automated registrations the board requires you to enter a confirmation code. This has not been configured yet and hence cannot be used. Please try again later or contact the %sBoard Administrator%s.', 'VC_REFRESH' => 'Refresh confirmation code', 'VC_REFRESH_EXPLAIN' => 'If you cannot read the code you can request a new one by clicking the button.', diff --git a/phpBB/phpbb/captcha/plugins/incomplete.php b/phpBB/phpbb/captcha/plugins/incomplete.php new file mode 100644 index 0000000000..9669931761 --- /dev/null +++ b/phpBB/phpbb/captcha/plugins/incomplete.php @@ -0,0 +1,66 @@ +config, $this->phpbb_root_path, $this->phpEx); + + $this->template->assign_vars([ + 'CONFIRM_LANG' => $this->type != CONFIRM_POST ? 'CONFIRM_INCOMPLETE' : 'POST_CONFIRM_INCOMPLETE', + 'CONTACT_LINK' => $contact_link, + ]); + + return 'captcha_incomplete.html'; + } + + public function validate() + { + return false; + } + + public function is_solved() + { + return false; + } +} \ No newline at end of file diff --git a/phpBB/styles/prosilver/template/captcha_incomplete.html b/phpBB/styles/prosilver/template/captcha_incomplete.html new file mode 100644 index 0000000000..ed6b0af156 --- /dev/null +++ b/phpBB/styles/prosilver/template/captcha_incomplete.html @@ -0,0 +1,7 @@ +
+
+ +

{{ lang('CONFIRMATION') }}

+

{{ lang(CONFIRM_LANG, '', '') }}

+
+