diff --git a/src/public/edit.php b/src/public/edit.php index e142c6e..888dfb0 100644 --- a/src/public/edit.php +++ b/src/public/edit.php @@ -172,12 +172,24 @@ else { // Update form if (!empty($_POST)) { - // Approve by moderation request - if ($user->approved || (isset($_POST['approved']) && in_array($user->address, MODERATOR_IP_LIST))) + // Approve by approved user + if ($user->approved) { $db->updateMagnetApproved($magnet->magnetId, true, time()); } + // Approve by moderation request + if (in_array($user->address, MODERATOR_IP_LIST)) + { + $db->updateMagnetApproved($magnet->magnetId, isset($_POST['approved']), time()); + + // Auto-approve user on magnet approve + if (USER_AUTO_APPROVE_ON_MAGNET_APPROVE) + { + $db->updateUserApproved($magnet->userId, isset($_POST['approved']), time()); + } + } + // Set default approve status else {