refactor(autoload): migrate theme classes to Composer PSR-4
Move 288 types from global AKSRT_* + inc/classes manual requires into
namespace AKSRT\{Domain} under src/AKSRT/, wire composer.json psr-4,
and slim bootstrap to helpers/modules/hooks only. Split multi-class
widget/gateway files, update admin contract audit paths, and document
the layout in ADR/README.
This commit is contained in:
1 parent
8f349b40fb
commit
aaf458af1c
404 files changed
+13602
-7705
No files matched your search
@@ -17,7 +17,7 @@ defined('ABSPATH') || exit;
|
||||
// ============================================
|
||||
// 检测当前模式:设置密码 or 请求重置
|
||||
// ============================================
|
||||
$context = AKSRT_Auth_Service::get_reset_context($_GET);
|
||||
$context = \AKSRT\Auth\Service::get_reset_context($_GET);
|
||||
$mode = $context['mode'];
|
||||
$errors = [];
|
||||
$success = '';
|
||||
@@ -34,7 +34,7 @@ if (!empty($context['error'])) {
|
||||
|
||||
// 模式1:请求重置密码(忘记密码表单提交)
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['aksrt_action']) && $_POST['aksrt_action'] === 'request_reset') {
|
||||
$result = AKSRT_Auth_Service::request_password_reset($_POST);
|
||||
$result = \AKSRT\Auth\Service::request_password_reset($_POST);
|
||||
if (!empty($result['success'])) {
|
||||
$success = $result['message'] ?? __('如果该账号存在,重置邮件已发送到注册邮箱', 'aksrt');
|
||||
} else {
|
||||
@@ -44,7 +44,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['aksrt_action']) && $_
|
||||
|
||||
// 模式2:设置新密码(从邮件链接进入)
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['aksrt_action']) && $_POST['aksrt_action'] === 'set_password') {
|
||||
$result = AKSRT_Auth_Service::reset_password_with_token($_POST);
|
||||
$result = \AKSRT\Auth\Service::reset_password_with_token($_POST);
|
||||
if (!empty($result['success'])) {
|
||||
$mode = 'success';
|
||||
$success = $result['message'] ?? __('密码已设置成功!', 'aksrt');
|
||||
|
||||
Reference in new issue
Block a user