From 14a6e5ec73779d18cc6f09cb3b1cb4fd08f024f8 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Mon, 29 Oct 2012 09:34:51 -0400 Subject: [ticket/11157] Fix remaining captcha spam. PHPBB3-11157 --- phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php | 4 ++-- .../includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php | 4 ++-- phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php | 4 ++-- phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php | 10 +++++----- phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) (limited to 'phpBB/includes/captcha') diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php index 6c1f3bf00b..e4503cabe4 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php @@ -55,7 +55,7 @@ class phpbb_captcha_gd extends phpbb_default_captcha return $instance; } - function is_available() + public static function is_available() { global $phpbb_root_path, $phpEx; @@ -80,7 +80,7 @@ class phpbb_captcha_gd extends phpbb_default_captcha return true; } - function get_name() + public static function get_name() { return 'CAPTCHA_GD'; } diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php index a5588178bb..06ad9dbbf6 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php @@ -44,7 +44,7 @@ class phpbb_captcha_gd_wave extends phpbb_default_captcha return new phpbb_captcha_gd_wave(); } - function is_available() + public static function is_available() { global $phpbb_root_path, $phpEx; @@ -61,7 +61,7 @@ class phpbb_captcha_gd_wave extends phpbb_default_captcha return can_load_dll('gd'); } - function get_name() + public static function get_name() { return 'CAPTCHA_GD_3D'; } diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php index 96f13fbe1b..563dbf6660 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php @@ -45,12 +45,12 @@ class phpbb_captcha_nogd extends phpbb_default_captcha return $instance; } - function is_available() + public static function is_available() { return true; } - function get_name() + public static function get_name() { return 'CAPTCHA_NO_GD'; } diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php index 99813189d7..c005d478a2 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php @@ -108,7 +108,7 @@ class phpbb_captcha_qa /** * See if the captcha has created its tables. */ - function is_installed() + public static function is_installed() { global $db, $phpbb_root_path, $phpEx; @@ -124,14 +124,14 @@ class phpbb_captcha_qa /** * API function - for the captcha to be available, it must have installed itself and there has to be at least one question in the board's default lang */ - function is_available() + public static function is_available() { global $config, $db, $phpbb_root_path, $phpEx, $user; // load language file for pretty display in the ACP dropdown $user->add_lang('captcha_qa'); - if (!phpbb_captcha_qa::is_installed()) + if (!self::is_installed()) { return false; } @@ -157,7 +157,7 @@ class phpbb_captcha_qa /** * API function */ - function get_name() + public static function get_name() { return 'CAPTCHA_QA'; } @@ -612,7 +612,7 @@ class phpbb_captcha_qa $user->add_lang('acp/board'); $user->add_lang('captcha_qa'); - if (!$this->is_installed()) + if (!self::is_installed()) { $this->install(); } diff --git a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php index 70c24a8c30..55bebf9443 100644 --- a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php @@ -60,7 +60,7 @@ class phpbb_recaptcha extends phpbb_default_captcha return $instance; } - function is_available() + public static function is_available() { global $config, $user; $user->add_lang('captcha_recaptcha'); @@ -75,7 +75,7 @@ class phpbb_recaptcha extends phpbb_default_captcha return true; } - function get_name() + public static function get_name() { return 'CAPTCHA_RECAPTCHA'; } @@ -163,7 +163,7 @@ class phpbb_recaptcha extends phpbb_default_captcha 'RECAPTCHA_SERVER' => $this->recaptcha_server, 'RECAPTCHA_PUBKEY' => isset($config['recaptcha_pubkey']) ? $config['recaptcha_pubkey'] : '', 'RECAPTCHA_ERRORGET' => '', - 'S_RECAPTCHA_AVAILABLE' => $this->is_available(), + 'S_RECAPTCHA_AVAILABLE' => self::is_available(), 'S_CONFIRM_CODE' => true, 'S_TYPE' => $this->type, 'L_CONFIRM_EXPLAIN' => $explain, -- cgit v1.2.1 From d602f13d7f6ba7ee67a5286befd8afd9f8f0cd15 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Mon, 29 Oct 2012 14:54:54 -0400 Subject: [ticket/11157] static public is the currently approved order. PHPBB3-11157 --- phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php | 4 ++-- phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php | 4 ++-- phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php | 4 ++-- phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php | 6 +++--- phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) (limited to 'phpBB/includes/captcha') diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php index e4503cabe4..5328e64a86 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php @@ -55,7 +55,7 @@ class phpbb_captcha_gd extends phpbb_default_captcha return $instance; } - public static function is_available() + static public function is_available() { global $phpbb_root_path, $phpEx; @@ -80,7 +80,7 @@ class phpbb_captcha_gd extends phpbb_default_captcha return true; } - public static function get_name() + static public function get_name() { return 'CAPTCHA_GD'; } diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php index 06ad9dbbf6..48af287723 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php @@ -44,7 +44,7 @@ class phpbb_captcha_gd_wave extends phpbb_default_captcha return new phpbb_captcha_gd_wave(); } - public static function is_available() + static public function is_available() { global $phpbb_root_path, $phpEx; @@ -61,7 +61,7 @@ class phpbb_captcha_gd_wave extends phpbb_default_captcha return can_load_dll('gd'); } - public static function get_name() + static public function get_name() { return 'CAPTCHA_GD_3D'; } diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php index 563dbf6660..6d6e2c6036 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php @@ -45,12 +45,12 @@ class phpbb_captcha_nogd extends phpbb_default_captcha return $instance; } - public static function is_available() + static public function is_available() { return true; } - public static function get_name() + static public function get_name() { return 'CAPTCHA_NO_GD'; } diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php index c005d478a2..0eae643d33 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php @@ -108,7 +108,7 @@ class phpbb_captcha_qa /** * See if the captcha has created its tables. */ - public static function is_installed() + static public function is_installed() { global $db, $phpbb_root_path, $phpEx; @@ -124,7 +124,7 @@ class phpbb_captcha_qa /** * API function - for the captcha to be available, it must have installed itself and there has to be at least one question in the board's default lang */ - public static function is_available() + static public function is_available() { global $config, $db, $phpbb_root_path, $phpEx, $user; @@ -157,7 +157,7 @@ class phpbb_captcha_qa /** * API function */ - public static function get_name() + static public function get_name() { return 'CAPTCHA_QA'; } diff --git a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php index 55bebf9443..cf14caff54 100644 --- a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php @@ -60,7 +60,7 @@ class phpbb_recaptcha extends phpbb_default_captcha return $instance; } - public static function is_available() + static public function is_available() { global $config, $user; $user->add_lang('captcha_recaptcha'); @@ -75,7 +75,7 @@ class phpbb_recaptcha extends phpbb_default_captcha return true; } - public static function get_name() + static public function get_name() { return 'CAPTCHA_RECAPTCHA'; } -- cgit v1.2.1 From 31781adf0ca9880069c8831177b34d573456f5d4 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Mon, 29 Oct 2012 14:57:27 -0400 Subject: [ticket/11159] static public is the currently approved order. PHPBB3-11159 --- phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php | 2 +- phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php | 2 +- phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php | 2 +- phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php | 2 +- phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'phpBB/includes/captcha') diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php index 6c1f3bf00b..1a3523567e 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php @@ -49,7 +49,7 @@ class phpbb_captcha_gd extends phpbb_default_captcha } } - public static function get_instance() + static public function get_instance() { $instance = new phpbb_captcha_gd(); return $instance; diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php index a5588178bb..bc61397fe6 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php @@ -39,7 +39,7 @@ class phpbb_captcha_gd_wave extends phpbb_default_captcha } } - public static function get_instance() + static public function get_instance() { return new phpbb_captcha_gd_wave(); } diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php index 96f13fbe1b..b3764f6f81 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php @@ -39,7 +39,7 @@ class phpbb_captcha_nogd extends phpbb_default_captcha } } - public static function get_instance() + static public function get_instance() { $instance = new phpbb_captcha_nogd(); return $instance; diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php index 99813189d7..8fc45db8cb 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php @@ -98,7 +98,7 @@ class phpbb_captcha_qa /** * API function */ - public static function get_instance() + static public function get_instance() { $instance = new phpbb_captcha_qa(); diff --git a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php index 70c24a8c30..cdda89eb10 100644 --- a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php @@ -54,7 +54,7 @@ class phpbb_recaptcha extends phpbb_default_captcha $this->response = request_var('recaptcha_response_field', ''); } - public static function get_instance() + static public function get_instance() { $instance = new phpbb_recaptcha(); return $instance; -- cgit v1.2.1 From 644662bc2cee77de5e43134635b82fe5acd03538 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Tue, 6 Nov 2012 16:43:48 -0500 Subject: [ticket/11159] Static public is the currently approved order. PHPBB3-11159 --- phpBB/includes/captcha/captcha_factory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/captcha') diff --git a/phpBB/includes/captcha/captcha_factory.php b/phpBB/includes/captcha/captcha_factory.php index d57b333c69..1ed8e119b5 100644 --- a/phpBB/includes/captcha/captcha_factory.php +++ b/phpBB/includes/captcha/captcha_factory.php @@ -25,7 +25,7 @@ class phpbb_captcha_factory /** * return an instance of class $name in file $name_plugin.php */ - public static function get_instance($name) + static public function get_instance($name) { global $phpbb_root_path, $phpEx; -- cgit v1.2.1 From 195014867ae84fe04ec01c913e38bf1d435590f7 Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sat, 10 Nov 2012 11:25:22 +0100 Subject: [ticket/11183] Remove $load_extensions and weird dl() calls PHPBB3-11183 --- phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php | 14 +------------- .../captcha/plugins/phpbb_captcha_gd_wave_plugin.php | 14 +------------- 2 files changed, 2 insertions(+), 26 deletions(-) (limited to 'phpBB/includes/captcha') diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php index 4ad34f2a26..c0c355f33b 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php @@ -57,19 +57,7 @@ class phpbb_captcha_gd extends phpbb_default_captcha static public function is_available() { - global $phpbb_root_path, $phpEx; - - if (@extension_loaded('gd')) - { - return true; - } - - if (!function_exists('can_load_dll')) - { - include($phpbb_root_path . 'includes/functions_install.' . $phpEx); - } - - return can_load_dll('gd'); + return @extension_loaded('gd'); } /** diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php index 26383c76a8..0d4b8bd451 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php @@ -46,19 +46,7 @@ class phpbb_captcha_gd_wave extends phpbb_default_captcha static public function is_available() { - global $phpbb_root_path, $phpEx; - - if (@extension_loaded('gd')) - { - return true; - } - - if (!function_exists('can_load_dll')) - { - include($phpbb_root_path . 'includes/functions_install.' . $phpEx); - } - - return can_load_dll('gd'); + return @extension_loaded('gd'); } static public function get_name() -- cgit v1.2.1