From 160ff7b912243dc14d871b820213ddcd20dd06f4 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Fri, 8 Aug 2014 18:02:03 +0200 Subject: [ticket/11854] Move captcha stuff to phpbb/ and use DI for plugins PHPBB3-11854 --- phpBB/phpbb/captcha/plugins/nogd.php | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 phpBB/phpbb/captcha/plugins/nogd.php (limited to 'phpBB/phpbb/captcha/plugins/nogd.php') diff --git a/phpBB/phpbb/captcha/plugins/nogd.php b/phpBB/phpbb/captcha/plugins/nogd.php new file mode 100644 index 0000000000..dbf0664a62 --- /dev/null +++ b/phpBB/phpbb/captcha/plugins/nogd.php @@ -0,0 +1,50 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ + +namespace phpbb\captcha\plugins; + +class nogd extends captcha_abstract +{ + public function is_available() + { + return true; + } + + public function get_name() + { + return 'CAPTCHA_NO_GD'; + } + + /** + * @return string the name of the service corresponding to the plugin + */ + function get_service_name() + { + return 'core.captcha.plugins.nogd'; + } + + /** + * @return string the name of the class used to generate the captcha + */ + function get_generator_class() + { + return '\\phpbb\\captcha\\non_gd'; + } + + function acp_page($id, &$module) + { + global $user; + + trigger_error($user->lang['CAPTCHA_NO_OPTIONS'] . adm_back_link($module->u_action)); + } +} -- cgit v1.2.1 From 756aa68b34e8584c7e010b2295ff63e485be1907 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Mon, 11 Aug 2014 08:04:14 +0200 Subject: [ticket/11854] Don't override get service name in nogd PHPBB3-11854 --- phpBB/phpbb/captcha/plugins/nogd.php | 8 -------- 1 file changed, 8 deletions(-) (limited to 'phpBB/phpbb/captcha/plugins/nogd.php') diff --git a/phpBB/phpbb/captcha/plugins/nogd.php b/phpBB/phpbb/captcha/plugins/nogd.php index dbf0664a62..6845e5935c 100644 --- a/phpBB/phpbb/captcha/plugins/nogd.php +++ b/phpBB/phpbb/captcha/plugins/nogd.php @@ -25,14 +25,6 @@ class nogd extends captcha_abstract return 'CAPTCHA_NO_GD'; } - /** - * @return string the name of the service corresponding to the plugin - */ - function get_service_name() - { - return 'core.captcha.plugins.nogd'; - } - /** * @return string the name of the class used to generate the captcha */ -- cgit v1.2.1