fix(reports): separate readable categories from report content
Store readable category snapshots separately from details and evidence, validate report categories, and preserve context in admin displays and moderation actions. Widen report categories to TEXT and bump the schema to 3.2.0 without legacy data conversion. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b2811cc248
commit
b45fd161f0
16 files changed
+797
-75
No files matched your search
@@ -123,10 +123,11 @@ trait UsersMenusBan {
|
||||
echo '</td><td class="column-summary">';
|
||||
if ($report) {
|
||||
echo '<strong>' . $this->ban_target_link((string) ($payload['target_type'] ?? ''), (int) ($payload['target_id'] ?? 0)) . '</strong>';
|
||||
echo '<div class="aksrt-ban-summary">' . esc_html((string) ($payload['category'] ?? '')) . '</div>';
|
||||
} else {
|
||||
echo '<strong>' . esc_html__('申请解除禁封', 'aksrt') . '</strong>';
|
||||
}
|
||||
echo '<div class="aksrt-ban-summary">' . esc_html((string) ($payload['reason'] ?? '')) . '</div>';
|
||||
if ((string) ($payload['reason'] ?? '') !== '') echo '<div class="aksrt-ban-summary">' . esc_html((string) $payload['reason']) . '</div>';
|
||||
$this->render_ban_detail_template($row, $filters, $page);
|
||||
echo '</td><td class="column-status">' . $this->ban_status_badge($row) . '</td>';
|
||||
echo '<td class="column-time">' . esc_html($this->ban_time((string) $row['time'])) . '</td>';
|
||||
|
||||
@@ -93,7 +93,7 @@ trait UsersMenusBanDialogs {
|
||||
$type = (string) ($payload['target_type'] ?? '');
|
||||
$id = (int) ($payload['target_id'] ?? 0);
|
||||
echo '<section class="aksrt-ban-section"><h3>' . esc_html__('举报对象', 'aksrt') . '</h3><div class="aksrt-ban-target">' . $this->ban_target_link($type, $id) . '</div></section>';
|
||||
if (!empty($payload['category'])) $this->render_ban_text_section(__('举报分类', 'aksrt'), (string) $payload['category']);
|
||||
if ((string) ($payload['category'] ?? '') !== '') $this->render_ban_text_section(__('举报分类', 'aksrt'), (string) $payload['category']);
|
||||
$this->render_ban_text_section(__('举报内容与举证', 'aksrt'), (string) ($payload['reason'] ?? ''));
|
||||
if ($type === 'user') {
|
||||
$this->render_ban_restriction_section($id);
|
||||
|
||||
Reference in new issue
Block a user