refactor: remove forum and topic feature chains
This commit is contained in:
1 parent
698e3750f9
commit
6c6c462df8
69 files changed
+339
-2057
No files matched your search
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Single execution path for "create a payment attempt for an existing order".
|
||||
*
|
||||
* Every cashier (shop / content / VIP / forum / recharge / points) must route
|
||||
* Every cashier (shop / content / VIP / recharge / points) must route
|
||||
* through here so that all of them get:
|
||||
* 1. a cross-request attempt lock (no double deduction on double-click)
|
||||
* 2. a fresh provider out_trade_no on re-pay (providers reject reused numbers)
|
||||
|
||||
@@ -173,7 +173,7 @@ class WeChatNotify {
|
||||
if (empty($config['enabled'])) return;
|
||||
|
||||
// 仅特定类型通知发送微信
|
||||
$allowed_types = ['comment_reply', 'system_notice', 'order_paid', 'credits_change', 'forum_reply'];
|
||||
$allowed_types = ['comment_reply', 'system_notice', 'order_paid', 'credits_change'];
|
||||
if (!in_array($type, $allowed_types, true)) return;
|
||||
|
||||
$this->send($user_id, $type, $data);
|
||||
@@ -219,7 +219,7 @@ class WeChatNotify {
|
||||
'has_template' => !empty($config['template_id']),
|
||||
'bound_users' => $bound_count,
|
||||
'app_secret' => !empty($config['app_secret']) ? '***' : '',
|
||||
'allowed_types' => ['comment_reply', 'system_notice', 'order_paid', 'credits_change', 'forum_reply'],
|
||||
'allowed_types' => ['comment_reply', 'system_notice', 'order_paid', 'credits_change'],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -234,7 +234,6 @@ class WeChatNotify {
|
||||
'system_notice' => true,
|
||||
'order_paid' => true,
|
||||
'credits_change' => false,
|
||||
'forum_reply' => false,
|
||||
];
|
||||
}
|
||||
return $subs;
|
||||
@@ -244,7 +243,7 @@ class WeChatNotify {
|
||||
* Update notification subscriptions for a user.
|
||||
*/
|
||||
public function update_user_subscriptions(int $user_id, array $subscriptions): bool {
|
||||
$allowed = ['comment_reply', 'system_notice', 'order_paid', 'credits_change', 'forum_reply'];
|
||||
$allowed = ['comment_reply', 'system_notice', 'order_paid', 'credits_change'];
|
||||
$clean = [];
|
||||
foreach ($allowed as $key) {
|
||||
$clean[$key] = !empty($subscriptions[$key]);
|
||||
|
||||
Reference in new issue
Block a user