mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Merge remote-tracking branch 'igorw/ticket/9608' into develop
* igorw/ticket/9608: [ticket/9608] Remove use of references in topic_review [ticket/9608] Revert changes to normalizer [ticket/9608] Remove blank line [ticket/9608] Remove use of references in captcha and other places
This commit is contained in:
commit
5fa096aca4
12 changed files with 22 additions and 23 deletions
|
@ -46,7 +46,7 @@ class acp_captcha
|
||||||
// Delegate
|
// Delegate
|
||||||
if ($configure)
|
if ($configure)
|
||||||
{
|
{
|
||||||
$config_captcha =& phpbb_captcha_factory::get_instance($selected);
|
$config_captcha = phpbb_captcha_factory::get_instance($selected);
|
||||||
$config_captcha->acp_page($id, $this);
|
$config_captcha->acp_page($id, $this);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -78,11 +78,11 @@ class acp_captcha
|
||||||
// sanity check
|
// sanity check
|
||||||
if (isset($captchas['available'][$selected]))
|
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();
|
$old_captcha->uninstall();
|
||||||
|
|
||||||
set_config('captcha_plugin', $selected);
|
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();
|
$new_captcha->install();
|
||||||
|
|
||||||
add_log('admin', 'LOG_CONFIG_VISUAL');
|
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>';
|
$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 => $options)
|
foreach ($config_vars as $config_var => $options)
|
||||||
{
|
{
|
||||||
|
@ -136,7 +136,7 @@ class acp_captcha
|
||||||
{
|
{
|
||||||
global $db, $user, $config;
|
global $db, $user, $config;
|
||||||
|
|
||||||
$captcha =& phpbb_captcha_factory::get_instance($selected);
|
$captcha = phpbb_captcha_factory::get_instance($selected);
|
||||||
$captcha->init(CONFIRM_REG);
|
$captcha->init(CONFIRM_REG);
|
||||||
$captcha->execute_demo();
|
$captcha->execute_demo();
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ function login_db($username, $password, $ip = '', $browser = '', $forwarded_for
|
||||||
include ($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
|
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_LOGIN);
|
$captcha->init(CONFIRM_LOGIN);
|
||||||
$vc_response = $captcha->validate($row);
|
$vc_response = $captcha->validate($row);
|
||||||
if ($vc_response)
|
if ($vc_response)
|
||||||
|
|
|
@ -26,7 +26,7 @@ class phpbb_captcha_factory
|
||||||
/**
|
/**
|
||||||
* return an instance of class $name in file $name_plugin.php
|
* return an instance of class $name in file $name_plugin.php
|
||||||
*/
|
*/
|
||||||
function &get_instance($name)
|
function get_instance($name)
|
||||||
{
|
{
|
||||||
global $phpbb_root_path, $phpEx;
|
global $phpbb_root_path, $phpEx;
|
||||||
|
|
||||||
|
|
|
@ -50,9 +50,9 @@ class phpbb_captcha_gd extends phpbb_default_captcha
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function &get_instance()
|
function get_instance()
|
||||||
{
|
{
|
||||||
$instance =& new phpbb_captcha_gd();
|
$instance = new phpbb_captcha_gd();
|
||||||
return $instance;
|
return $instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,9 +40,9 @@ class phpbb_captcha_nogd extends phpbb_default_captcha
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function &get_instance()
|
function get_instance()
|
||||||
{
|
{
|
||||||
$instance =& new phpbb_captcha_nogd();
|
$instance = new phpbb_captcha_nogd();
|
||||||
return $instance;
|
return $instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,9 +99,9 @@ class phpbb_captcha_qa
|
||||||
/**
|
/**
|
||||||
* API function
|
* API function
|
||||||
*/
|
*/
|
||||||
function &get_instance()
|
function get_instance()
|
||||||
{
|
{
|
||||||
$instance =& new phpbb_captcha_qa();
|
$instance = new phpbb_captcha_qa();
|
||||||
|
|
||||||
return $instance;
|
return $instance;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,9 +54,9 @@ class phpbb_recaptcha extends phpbb_default_captcha
|
||||||
$this->response = request_var('recaptcha_response_field', '');
|
$this->response = request_var('recaptcha_response_field', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
function &get_instance()
|
function get_instance()
|
||||||
{
|
{
|
||||||
$instance =& new phpbb_recaptcha();
|
$instance = new phpbb_recaptcha();
|
||||||
return $instance;
|
return $instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1078,7 +1078,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$row =& $rowset[$post_list[$i]];
|
$row = $rowset[$post_list[$i]];
|
||||||
|
|
||||||
$poster_id = $row['user_id'];
|
$poster_id = $row['user_id'];
|
||||||
$post_subject = $row['post_subject'];
|
$post_subject = $row['post_subject'];
|
||||||
|
|
|
@ -157,12 +157,11 @@ class ucp_register
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// The CAPTCHA kicks in here. We can't help that the information gets lost on language change.
|
// The CAPTCHA kicks in here. We can't help that the information gets lost on language change.
|
||||||
if ($config['enable_confirm'])
|
if ($config['enable_confirm'])
|
||||||
{
|
{
|
||||||
include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
|
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);
|
$captcha->init(CONFIRM_REG);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1547,7 +1547,7 @@ switch ($mode)
|
||||||
for ($i = 0, $end = sizeof($user_list); $i < $end; ++$i)
|
for ($i = 0, $end = sizeof($user_list); $i < $end; ++$i)
|
||||||
{
|
{
|
||||||
$user_id = $user_list[$i];
|
$user_id = $user_list[$i];
|
||||||
$row =& $id_cache[$user_id];
|
$row = $id_cache[$user_id];
|
||||||
$is_leader = (isset($row['group_leader']) && $row['group_leader']) ? true : false;
|
$is_leader = (isset($row['group_leader']) && $row['group_leader']) ? true : false;
|
||||||
$leaders_set = ($leaders_set || $is_leader);
|
$leaders_set = ($leaders_set || $is_leader);
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ $user->setup(array('posting', 'mcp', 'viewtopic'), $post_data['forum_style']);
|
||||||
if ($config['enable_post_confirm'] && !$user->data['is_registered'])
|
if ($config['enable_post_confirm'] && !$user->data['is_registered'])
|
||||||
{
|
{
|
||||||
include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
|
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_POST);
|
$captcha->init(CONFIRM_POST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1302,7 +1302,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$row =& $rowset[$post_list[$i]];
|
$row = $rowset[$post_list[$i]];
|
||||||
$poster_id = $row['user_id'];
|
$poster_id = $row['user_id'];
|
||||||
|
|
||||||
// End signature parsing, only if needed
|
// End signature parsing, only if needed
|
||||||
|
|
Loading…
Add table
Reference in a new issue