diff options
author | Henry Sudhof <kellanved@phpbb.com> | 2009-06-13 14:09:51 +0000 |
---|---|---|
committer | Henry Sudhof <kellanved@phpbb.com> | 2009-06-13 14:09:51 +0000 |
commit | 11dc41063313d62b100c16bceb289b12c7c3bf2b (patch) | |
tree | fc951aec5ce030c8bfab86071e2163bebf968988 /phpBB/includes | |
parent | cf3aad78cf902def95335f1e4bb7603126cd9221 (diff) | |
download | forums-11dc41063313d62b100c16bceb289b12c7c3bf2b.tar forums-11dc41063313d62b100c16bceb289b12c7c3bf2b.tar.gz forums-11dc41063313d62b100c16bceb289b12c7c3bf2b.tar.bz2 forums-11dc41063313d62b100c16bceb289b12c7c3bf2b.tar.xz forums-11dc41063313d62b100c16bceb289b12c7c3bf2b.zip |
Oh right. PHP4
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9581 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/acp/acp_captcha.php | 10 | ||||
-rw-r--r-- | phpBB/includes/auth/auth_db.php | 2 | ||||
-rw-r--r-- | phpBB/includes/captcha/captcha_factory.php | 5 | ||||
-rw-r--r-- | phpBB/includes/captcha/captcha_gd.php | 1 | ||||
-rw-r--r-- | phpBB/includes/captcha/plugins/captcha_abstract.php | 2 | ||||
-rw-r--r-- | phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php | 5 | ||||
-rw-r--r-- | phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php | 5 | ||||
-rw-r--r-- | phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php | 5 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_register.php | 2 |
9 files changed, 21 insertions, 16 deletions
diff --git a/phpBB/includes/acp/acp_captcha.php b/phpBB/includes/acp/acp_captcha.php index 7c7a5acc9f..74e0521e12 100644 --- a/phpBB/includes/acp/acp_captcha.php +++ b/phpBB/includes/acp/acp_captcha.php @@ -43,7 +43,7 @@ class acp_captcha // Delegate if ($configure) { - $config_captcha = phpbb_captcha_factory::get_instance($selected); + $config_captcha =& phpbb_captcha_factory::get_instance($selected); $config_captcha->acp_page($id, $this); add_log('admin', 'LOG_CONFIG_VISUAL'); } @@ -78,11 +78,11 @@ class acp_captcha // sanity check if (isset($captchas['available'][$selected])) { - $old_captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']); + $old_captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']); $old_captcha->uninstall(); set_config('captcha_plugin', $selected); - $new_captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']); + $new_captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']); $new_captcha->install(); add_log('admin', 'LOG_CONFIG_VISUAL'); @@ -113,7 +113,7 @@ class acp_captcha $captcha_select .= '<option value="' . $value . '"' . $current . ' class="disabled-option">' . $user->lang[$title] . '</option>'; } - $demo_captcha = phpbb_captcha_factory::get_instance($selected); + $demo_captcha =& phpbb_captcha_factory::get_instance($selected); foreach ($config_vars as $config_var => $template_var) { @@ -135,7 +135,7 @@ class acp_captcha { global $db, $user, $config; - $captcha = phpbb_captcha_factory::get_instance($selected); + $captcha =& phpbb_captcha_factory::get_instance($selected); $captcha->init(CONFIRM_REG); $captcha->execute_demo(); diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php index f798264ada..5dc141ff77 100644 --- a/phpBB/includes/auth/auth_db.php +++ b/phpBB/includes/auth/auth_db.php @@ -80,7 +80,7 @@ function login_db(&$username, &$password) } else { - $captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']); + $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']); $captcha->init(CONFIRM_LOGIN); $vc_response = $captcha->validate(); diff --git a/phpBB/includes/captcha/captcha_factory.php b/phpBB/includes/captcha/captcha_factory.php index b5fa69990d..73406a954f 100644 --- a/phpBB/includes/captcha/captcha_factory.php +++ b/phpBB/includes/captcha/captcha_factory.php @@ -26,7 +26,7 @@ class phpbb_captcha_factory /** * return an instance of class $name in file $name_plugin.php */ - function get_instance($name) + function &get_instance($name) { global $phpbb_root_path, $phpEx; @@ -35,7 +35,8 @@ class phpbb_captcha_factory { include($phpbb_root_path . "includes/captcha/plugins/{$name}_plugin." . $phpEx); } - return call_user_func(array($name, 'get_instance')); + $instance =& call_user_func(array($name, 'get_instance')); + return $instance; } /** diff --git a/phpBB/includes/captcha/captcha_gd.php b/phpBB/includes/captcha/captcha_gd.php index 9734a63c1b..91915ce80c 100644 --- a/phpBB/includes/captcha/captcha_gd.php +++ b/phpBB/includes/captcha/captcha_gd.php @@ -34,6 +34,7 @@ class captcha function execute($code, $seed) { global $config; + srand($seed); //mt_srand($seed); diff --git a/phpBB/includes/captcha/plugins/captcha_abstract.php b/phpBB/includes/captcha/plugins/captcha_abstract.php index 9e52762bc2..6ca6bc628e 100644 --- a/phpBB/includes/captcha/plugins/captcha_abstract.php +++ b/phpBB/includes/captcha/plugins/captcha_abstract.php @@ -131,7 +131,7 @@ class phpbb_default_captcha { $hidden_fields = array(); - // this is required for postig.php - otherwise we would forget about the captcha being already solved + // this is required for posting.php - otherwise we would forget about the captcha being already solved if ($this->solved) { $hidden_fields['confirm_code'] = $this->confirm_code; diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php index cd821f959e..06178ece50 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php @@ -51,9 +51,10 @@ class phpbb_captcha_gd extends phpbb_default_captcha } } - function get_instance() + function &get_instance() { - return new phpbb_captcha_gd(); + $instance =& new phpbb_captcha_gd(); + return $instance; } function is_available() diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php index 517b55f09e..1fc859532a 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_nogd_plugin.php @@ -40,9 +40,10 @@ class phpbb_captcha_nogd extends phpbb_default_captcha } } - function get_instance() + function &get_instance() { - return new phpbb_captcha_nogd(); + $instance =& new phpbb_captcha_nogd(); + return $instance; } function is_available() diff --git a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php index a96f5ef9c6..2a20b4b78d 100644 --- a/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php @@ -42,9 +42,10 @@ class phpbb_recaptcha extends phpbb_default_captcha $this->response = request_var('recaptcha_response_field', ''); } - function get_instance() + function &get_instance() { - return new phpbb_recaptcha(); + $instance =& new phpbb_recaptcha(); + return $instance; } function is_available() diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 06606f602f..fa8119949f 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -56,7 +56,7 @@ class ucp_register if ($config['enable_confirm']) { include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx); - $captcha = phpbb_captcha_factory::get_instance($config['captcha_plugin']); + $captcha =& phpbb_captcha_factory::get_instance($config['captcha_plugin']); $captcha->init(CONFIRM_REG); } |