diff --git a/app/Repositories/BonusRepository.php b/app/Repositories/BonusRepository.php index c00a6b7d..5d0289eb 100644 --- a/app/Repositories/BonusRepository.php +++ b/app/Repositories/BonusRepository.php @@ -31,7 +31,6 @@ class BonusRepository extends BaseRepository $comment = nexus_trans('hr.bonus_cancel_comment', [ 'bonus' => $requireBonus, ], $user->locale); - $comment = addslashes($comment); do_log("comment: $comment"); $this->consumeUserBonus($user, $requireBonus, BonusLogs::BUSINESS_TYPE_CANCEL_HIT_AND_RUN, "$comment(H&R ID: {$hitAndRun->id})"); @@ -62,7 +61,6 @@ class BonusRepository extends BaseRepository 'bonus' => $requireBonus, 'medal_name' => $medal->name, ], $user->locale); - $comment = addslashes($comment); do_log("comment: $comment"); $this->consumeUserBonus($user, $requireBonus, BonusLogs::BUSINESS_TYPE_BUY_MEDAL, "$comment(medal ID: {$medal->id})"); $expireAt = null; @@ -85,7 +83,6 @@ class BonusRepository extends BaseRepository $comment = nexus_trans('bonus.comment_buy_attendance_card', [ 'bonus' => $requireBonus, ], $user->locale); - $comment = addslashes($comment); do_log("comment: $comment"); $this->consumeUserBonus($user, $requireBonus, BonusLogs::BUSINESS_TYPE_BUY_ATTENDANCE_CARD, $comment); User::query()->where('id', $user->id)->increment('attendance_card'); diff --git a/public/mybonus.php b/public/mybonus.php index f8ab2fe6..ea563d4e 100644 --- a/public/mybonus.php +++ b/public/mybonus.php @@ -658,7 +658,6 @@ if ($action == "exchange") { stderr("Error","Invalid Medal ID: " . ($_POST['medal_id'] ?? ''), false, false); } try { - $bonusRep = new \App\Repositories\BonusRepository(); $bonusRep->consumeToBuyMedal($userid, $_POST['medal_id']); nexus_redirect("" . get_protocol_prefix() . "$BASEURL/mybonus.php?do=buy_medal"); } catch (\Exception $exception) { @@ -667,7 +666,6 @@ if ($action == "exchange") { } } elseif ($art == 'attendance_card') { try { - $bonusRep = new \App\Repositories\BonusRepository(); $bonusRep->consumeToBuyAttendanceCard($userid); nexus_redirect("" . get_protocol_prefix() . "$BASEURL/mybonus.php?do=attendance_card"); } catch (\Exception $exception) {