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/gd_wave.php | 50 +++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 phpBB/phpbb/captcha/plugins/gd_wave.php (limited to 'phpBB/phpbb/captcha/plugins/gd_wave.php') diff --git a/phpBB/phpbb/captcha/plugins/gd_wave.php b/phpBB/phpbb/captcha/plugins/gd_wave.php new file mode 100644 index 0000000000..2d38ef08dd --- /dev/null +++ b/phpBB/phpbb/captcha/plugins/gd_wave.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 gd_wave extends captcha_abstract +{ + public function is_available() + { + return @extension_loaded('gd'); + } + + public function get_name() + { + return 'CAPTCHA_GD_3D'; + } + + /** + * @return string the name of the service corresponding to the plugin + */ + function get_service_name() + { + return 'core.captcha.plugins.gd_wave'; + } + + /** + * @return string the name of the class used to generate the captcha + */ + function get_generator_class() + { + return '\\phpbb\\captcha\\gd_wave'; + } + + function acp_page($id, &$module) + { + global $config, $db, $template, $user; + + trigger_error($user->lang['CAPTCHA_NO_OPTIONS'] . adm_back_link($module->u_action)); + } +} -- cgit v1.2.1 From fa2ac1f27126292a24aa33136b2d3a7f1832ea47 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Sun, 10 Aug 2014 15:10:14 +0200 Subject: [ticket/11854] Use a set_name method instead of overriding get_service_name PHPBB3-11854 --- phpBB/phpbb/captcha/plugins/gd_wave.php | 8 -------- 1 file changed, 8 deletions(-) (limited to 'phpBB/phpbb/captcha/plugins/gd_wave.php') diff --git a/phpBB/phpbb/captcha/plugins/gd_wave.php b/phpBB/phpbb/captcha/plugins/gd_wave.php index 2d38ef08dd..e1d44df778 100644 --- a/phpBB/phpbb/captcha/plugins/gd_wave.php +++ b/phpBB/phpbb/captcha/plugins/gd_wave.php @@ -25,14 +25,6 @@ class gd_wave extends captcha_abstract return 'CAPTCHA_GD_3D'; } - /** - * @return string the name of the service corresponding to the plugin - */ - function get_service_name() - { - return 'core.captcha.plugins.gd_wave'; - } - /** * @return string the name of the class used to generate the captcha */ -- cgit v1.2.1