From 3e9ec79face2027c851348147d1d996946974bf9 Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 10 Sep 2023 02:36:23 +0300 Subject: [PATCH] fix user auto-approve on magnet approve --- src/public/edit.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/public/edit.php b/src/public/edit.php index dc1f5b3..5eb0601 100644 --- a/src/public/edit.php +++ b/src/public/edit.php @@ -194,12 +194,6 @@ else { // Update form if (!empty($_POST)) { - // 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)) { @@ -212,10 +206,10 @@ else { } } - // Set default approve status + // Approve by user approved status else { - $db->updateMagnetApproved($magnet->magnetId, MAGNET_DEFAULT_APPROVED, time()); + $db->updateMagnetApproved($magnet->magnetId, (bool) $user->approved, time()); } // Meta