Files
ops-Gazelle/sections/reports/ajax_add_notes.php
T

15 lines
327 B
PHP

<?php
$postId = (int)$_POST['id'];
if (!($postId && $Viewer->permitted('site_moderate_forums'))) {
json_error('no post id');
}
$DB->prepared_query("
UPDATE reports SET
Notes = ?
WHERE ID = ?
", str_replace("<br />", "\n", trim($_POST['notes'])), $postId
);
print json_encode(['status' => 'success']);