Author: acydburn
Date: Tue Sep 22 11:03:17 2009
New Revision: 10177
Log:
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
Modified:
branches/phpBB-3_0_0/phpBB/includes/acp/acp_captcha.php
branches/phpBB-3_0_0/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php
branches/phpBB-3_0_0/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
branches/phpBB-3_0_0/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
Modified: branches/phpBB-3_0_0/phpBB/includes/acp/acp_captcha.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/includes/acp/acp_captcha.php (original)
--- branches/phpBB-3_0_0/phpBB/includes/acp/acp_captcha.php Tue Sep 22 11:03:17 2009
***************
*** 31,37 ****
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);
--- 31,37 ----
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,54 ****
{
$config_captcha =& phpbb_captcha_factory::get_instance($selected);
$config_captcha->acp_page($id, $this);
- add_log('admin', 'LOG_CONFIG_VISUAL');
}
else
{
--- 48,53 ----
Modified: branches/phpBB-3_0_0/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php (original)
--- branches/phpBB-3_0_0/phpBB/includes/captcha/plugins/phpbb_captcha_gd_plugin.php Tue Sep 22 11:03:17 2009
***************
*** 80,86 ****
{
return true;
}
!
function get_name()
{
return 'CAPTCHA_GD';
--- 80,86 ----
{
return true;
}
!
function get_name()
{
return 'CAPTCHA_GD';
***************
*** 123,128 ****
--- 123,130 ----
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,154 ****
function execute_demo()
{
global $config;
!
$config_old = $config;
foreach ($this->captcha_vars as $captcha_var => $template_var)
{
--- 150,156 ----
function execute_demo()
{
global $config;
!
$config_old = $config;
foreach ($this->captcha_vars as $captcha_var => $template_var)
{
Modified: branches/phpBB-3_0_0/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php (original)
--- branches/phpBB-3_0_0/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php Tue Sep 22 11:03:17 2009
***************
*** 685,690 ****
--- 685,691 ----
$this->acp_add_question($data);
}
+ add_log('admin', 'LOG_CONFIG_VISUAL');
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($list_url));
}
}
Modified: branches/phpBB-3_0_0/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php
==============================================================================
*** branches/phpBB-3_0_0/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php (original)
--- branches/phpBB-3_0_0/phpBB/includes/captcha/plugins/phpbb_recaptcha_plugin.php Tue Sep 22 11:03:17 2009
***************
*** 100,105 ****
--- 100,107 ----
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)
|