diff options
author | Nils Adermann <naderman@naderman.de> | 2010-06-25 14:38:53 +0200 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2010-07-05 15:40:46 +0200 |
commit | dea1d660fb63b07451f1a43310de359251462644 (patch) | |
tree | d4ba1c6e3ce05c3c545cc8ffaaddce56ee03db59 /phpBB/includes/captcha | |
parent | 22c3041e128bd2d10d37672bdf5c7c1eb4112b12 (diff) | |
download | forums-dea1d660fb63b07451f1a43310de359251462644.tar forums-dea1d660fb63b07451f1a43310de359251462644.tar.gz forums-dea1d660fb63b07451f1a43310de359251462644.tar.bz2 forums-dea1d660fb63b07451f1a43310de359251462644.tar.xz forums-dea1d660fb63b07451f1a43310de359251462644.zip |
[feature/auto-loading] Added autoloader to common and ensured compatability
The autoloader is registered in install without caching, since caching is set
up during installation. This provides the same functionality, performance is
not a concern during installation anyway.
In common.php the autoloader is instantiated after the cache is initialised and
is started with the standard cache backend used for other cached values.
A few places in the code using class_exists had to be updated to explicitly
avoid autoloading, since they are used to check whether a file needs to be
included which does not (yet) follow the naming scheme the autoloader follows.
PHPBB3-9682
Diffstat (limited to 'phpBB/includes/captcha')
5 files changed, 15 insertions, 15 deletions
diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php index 6e899adc16..a326074c14 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php @@ -19,7 +19,7 @@ if (!defined('IN_PHPBB')) /** * Placeholder for autoload */ -if (!class_exists('phpbb_default_captcha')) +if (!class_exists('phpbb_default_captcha', false)) { include($phpbb_root_path . 'includes/captcha/plugins/captcha_abstract.' . $phpEx); } 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 2f55d15efd..8ac0262302 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_wave_plugin.php @@ -19,7 +19,7 @@ if (!defined('IN_PHPBB')) /** * Placeholder for autoload */ -if (!class_exists('phpbb_default_captcha')) +if (!class_exists('phpbb_default_captcha', false)) { include($phpbb_root_path . 'includes/captcha/plugins/captcha_abstract.' . $phpEx); } diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php index ac30ed4297..834d2a7f12 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php @@ -19,7 +19,7 @@ if (!defined('IN_PHPBB')) /** * Placeholder for autoload */ -if (!class_exists('phpbb_default_captcha')) +if (!class_exists('phpbb_default_captcha', false)) { include($phpbb_root_path . 'includes/captcha/plugins/captcha_abstract.' . $phpEx); } diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php index 49a64b9339..c0cdc83fa1 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php @@ -87,7 +87,7 @@ class phpbb_captcha_qa } $db->sql_freeresult($result); } - + // okay, if there is a confirm_id, we try to load that confirm's state. If not, we try to find one if (!$this->load_answer() && (!$this->load_confirm_id() || !$this->load_answer())) { @@ -113,7 +113,7 @@ class phpbb_captcha_qa { global $db, $phpbb_root_path, $phpEx; - if (!class_exists('phpbb_db_tools')) + if (!class_exists('phpbb_db_tools', false)) { include("$phpbb_root_path/includes/db/db_tools.$phpEx"); } @@ -365,12 +365,12 @@ class phpbb_captcha_qa global $config, $db, $user; $error = ''; - + if (!sizeof($this->question_ids)) { return false; } - + if (!$this->confirm_id) { $error = $user->lang['CONFIRM_QUESTION_WRONG']; @@ -434,7 +434,7 @@ class phpbb_captcha_qa function reselect_question() { global $db, $user; - + if (!sizeof($this->question_ids)) { return false; @@ -482,8 +482,8 @@ class phpbb_captcha_qa global $db, $user; $sql = 'SELECT confirm_id - FROM ' . CAPTCHA_QA_CONFIRM_TABLE . " - WHERE + FROM ' . CAPTCHA_QA_CONFIRM_TABLE . " + WHERE session_id = '" . $db->sql_escape($user->session_id) . "' AND lang_iso = '" . $db->sql_escape($this->question_lang) . "' AND confirm_type = " . $this->type; @@ -505,7 +505,7 @@ class phpbb_captcha_qa function load_answer() { global $db, $user; - + if (!strlen($this->confirm_id) || !sizeof($this->question_ids)) { return false; @@ -990,9 +990,9 @@ class phpbb_captcha_qa return $langs; } - - - + + + /** * See if there is a question other than the one we have */ diff --git a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php index 0f0bfc4156..dad39867dc 100644 --- a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php @@ -16,7 +16,7 @@ if (!defined('IN_PHPBB')) exit; } -if (!class_exists('phpbb_default_captcha')) +if (!class_exists('phpbb_default_captcha', false)) { // we need the classic captcha code for tracking solutions and attempts include($phpbb_root_path . 'includes/captcha/plugins/captcha_abstract.' . $phpEx); |