mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 20:13:22 +01:00
Move add_log() call for captcha "configure" page to the captcha plugin, because only the plugin is able to know if the config got updated or not.
Note to captcha MOD authors: please check if you have a function acp_page() and if an add_log() call is required for your plugin. Bug #51695 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10177 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
5d52b32a63
commit
90e1187601
@ -31,7 +31,7 @@ class acp_captcha
|
||||
|
||||
include($phpbb_root_path . 'includes/captcha/captcha_factory.' . $phpEx);
|
||||
$captchas = phpbb_captcha_factory::get_captcha_types();
|
||||
|
||||
|
||||
$selected = request_var('select_captcha', $config['captcha_plugin']);
|
||||
$selected = (isset($captchas['available'][$selected]) || isset($captchas['unavailable'][$selected])) ? $selected : $config['captcha_plugin'];
|
||||
$configure = request_var('configure', false);
|
||||
@ -48,7 +48,6 @@ class acp_captcha
|
||||
{
|
||||
$config_captcha =& phpbb_captcha_factory::get_instance($selected);
|
||||
$config_captcha->acp_page($id, $this);
|
||||
add_log('admin', 'LOG_CONFIG_VISUAL');
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -80,7 +80,7 @@ class phpbb_captcha_gd extends phpbb_default_captcha
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function get_name()
|
||||
{
|
||||
return 'CAPTCHA_GD';
|
||||
@ -123,6 +123,8 @@ class phpbb_captcha_gd extends phpbb_default_captcha
|
||||
set_config($captcha_var, $value);
|
||||
}
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_CONFIG_VISUAL');
|
||||
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($module->u_action));
|
||||
}
|
||||
else if ($submit)
|
||||
@ -148,7 +150,7 @@ class phpbb_captcha_gd extends phpbb_default_captcha
|
||||
function execute_demo()
|
||||
{
|
||||
global $config;
|
||||
|
||||
|
||||
$config_old = $config;
|
||||
foreach ($this->captcha_vars as $captcha_var => $template_var)
|
||||
{
|
||||
|
@ -685,6 +685,7 @@ class phpbb_captcha_qa
|
||||
$this->acp_add_question($data);
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_CONFIG_VISUAL');
|
||||
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($list_url));
|
||||
}
|
||||
}
|
||||
|
@ -100,6 +100,8 @@ class phpbb_recaptcha extends phpbb_default_captcha
|
||||
set_config($captcha_var, $value);
|
||||
}
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_CONFIG_VISUAL');
|
||||
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($module->u_action));
|
||||
}
|
||||
else if ($submit)
|
||||
|
Loading…
x
Reference in New Issue
Block a user