refactor(admin): consolidate duplicate configuration
Remove duplicate comment, captcha, filing, and website-security configuration paths. Move front submission verification to the captcha scene matrix and retire obsolete admin routes and components.
This commit is contained in:
@@ -153,48 +153,6 @@ class Capabilities {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取"网站安全"设置(人机验证见 aksrt_get_captcha_status_summary)。
|
||||
*/
|
||||
public static function get_security_settings(): array {
|
||||
$s = Settings::get_all();
|
||||
|
||||
$captcha = function_exists('aksrt_get_captcha_status_summary')
|
||||
? aksrt_get_captcha_status_summary()
|
||||
: ['enabled' => false, 'provider' => '', 'configured' => false, 'scenes' => []];
|
||||
|
||||
return [
|
||||
'captcha' => $captcha,
|
||||
'brush_limit_post' => [
|
||||
'enabled' => !empty($s['brush_limit_post_enabled']),
|
||||
'minutes_10' => (int) ($s['brush_limit_post_minutes_10'] ?? 20),
|
||||
'day_1' => (int) ($s['brush_limit_post_day_1'] ?? 50),
|
||||
],
|
||||
'brush_limit_comment' => [
|
||||
'enabled' => !empty($s['brush_limit_comment_enabled']),
|
||||
'minutes_10' => (int) ($s['brush_limit_comment_minutes_10'] ?? 20),
|
||||
'day_1' => (int) ($s['brush_limit_comment_day_1'] ?? 100),
|
||||
],
|
||||
'brush_limit_upload' => [
|
||||
'enabled' => !empty($s['brush_limit_upload_enabled']),
|
||||
'minutes_10' => (int) ($s['brush_limit_upload_minutes_10'] ?? 50),
|
||||
'day_1' => (int) ($s['brush_limit_upload_day_1'] ?? 200),
|
||||
],
|
||||
'brush_limit_register' => [
|
||||
'enabled' => !empty($s['brush_limit_register_enabled']),
|
||||
'minutes_10' => (int) ($s['brush_limit_register_minutes_10'] ?? 20),
|
||||
'day_1' => (int) ($s['brush_limit_register_day_1'] ?? 100),
|
||||
],
|
||||
'brush_limit_order' => [
|
||||
'enabled' => !empty($s['brush_limit_order_enabled']),
|
||||
'minutes_10' => (int) ($s['brush_limit_order_minutes_10'] ?? 30),
|
||||
'day_1' => (int) ($s['brush_limit_order_day_1'] ?? 100),
|
||||
],
|
||||
'error_frequency_limit' => !empty($s['error_frequency_limit'] ?? true),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取"系统工具"设置
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user