mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Disable recaptcha addon if config is migrated to spamfilter module
This commit is contained in:
parent
4f888acc9e
commit
f2f6018b5f
1 changed files with 17 additions and 1 deletions
|
|
@ -169,7 +169,10 @@ class spamfilter extends ModuleObject
|
|||
return $output;
|
||||
}
|
||||
|
||||
$output->type = 'recaptcha';
|
||||
if ($config->use_pc === 'Y' || $config->use_mobile === 'Y')
|
||||
{
|
||||
$output->type = 'recaptcha';
|
||||
}
|
||||
$output->site_key = $config->site_key;
|
||||
$output->secret_key = $config->secret_key;
|
||||
$output->theme = $config->theme;
|
||||
|
|
@ -192,6 +195,19 @@ class spamfilter extends ModuleObject
|
|||
$output->target_modules[$module_srl] = true;
|
||||
}
|
||||
$output->target_modules_type = ($config->xe_run_method === 'run_selected') ? '+' : '-';
|
||||
|
||||
$oAddonAdminController = getAdminController('addon');
|
||||
if ($output->target_devices['pc'])
|
||||
{
|
||||
$oAddonAdminController->doDeactivate('recaptcha', 0, 'pc');
|
||||
$oAddonAdminController->makeCacheFile(0, 'pc');
|
||||
}
|
||||
if ($output->target_devices['mobile'])
|
||||
{
|
||||
$oAddonAdminController->doDeactivate('recaptcha', 0, 'mobile');
|
||||
$oAddonAdminController->makeCacheFile(0, 'mobile');
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue