aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/captcha
diff options
context:
space:
mode:
authorNathaniel Guse <nathaniel.guse@gmail.com>2012-11-10 10:58:44 -0600
committerNathaniel Guse <nathaniel.guse@gmail.com>2012-11-10 10:58:44 -0600
commit68363e362d4b6d3fe717a8ffae95ab13eb374e9f (patch)
treeeea655f80184a3cee5a95abec5da1437c6e9aa5a /phpBB/includes/captcha
parent6c8c54d4d2575cd40fe873cd2108b031ae5830a6 (diff)
parentf5ed04f8ff0c65e1bfe6a4953b974315dd2790d7 (diff)
downloadforums-68363e362d4b6d3fe717a8ffae95ab13eb374e9f.tar
forums-68363e362d4b6d3fe717a8ffae95ab13eb374e9f.tar.gz
forums-68363e362d4b6d3fe717a8ffae95ab13eb374e9f.tar.bz2
forums-68363e362d4b6d3fe717a8ffae95ab13eb374e9f.tar.xz
forums-68363e362d4b6d3fe717a8ffae95ab13eb374e9f.zip
Merge branch 'develop' of github.com:EXreaction/phpbb3 into ticket/11103
Conflicts: phpBB/install/schemas/mssql_schema.sql phpBB/report.php phpBB/styles/prosilver/template/ucp_prefs_personal.html phpBB/styles/subsilver2/template/ucp_prefs_personal.html
Diffstat (limited to 'phpBB/includes/captcha')
-rw-r--r--phpBB/includes/captcha/captcha_factory.php2
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php20
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php20
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php6
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php12
-rw-r--r--phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php8
6 files changed, 22 insertions, 46 deletions
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;
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php
index 6c1f3bf00b..c0c355f33b 100644
--- a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php
@@ -49,27 +49,15 @@ 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;
}
- function is_available()
+ 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');
}
/**
@@ -80,7 +68,7 @@ class phpbb_captcha_gd extends phpbb_default_captcha
return true;
}
- 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 a5588178bb..0d4b8bd451 100644
--- a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php
@@ -39,29 +39,17 @@ 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();
}
- function is_available()
+ 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');
}
- 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 96f13fbe1b..c5ef8c78b0 100644
--- a/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php
@@ -39,18 +39,18 @@ 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;
}
- function is_available()
+ static public function is_available()
{
return true;
}
- 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 99813189d7..ec7636f511 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();
@@ -108,7 +108,7 @@ class phpbb_captcha_qa
/**
* See if the captcha has created its tables.
*/
- function is_installed()
+ static public 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()
+ static public 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()
+ static public 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..83d40bbba7 100644
--- a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
+++ b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
@@ -54,13 +54,13 @@ 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;
}
- 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;
}
- function get_name()
+ static public 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,