diff --git a/app/Repositories/BonusRepository.php b/app/Repositories/BonusRepository.php
index 052bf4cd..a00ca11c 100644
--- a/app/Repositories/BonusRepository.php
+++ b/app/Repositories/BonusRepository.php
@@ -55,6 +55,9 @@ class BonusRepository extends BaseRepository
if ($exists) {
throw new \LogicException("user: $uid already own this medal: $medalId.");
}
+ if ($medal->get_type != Medal::GET_TYPE_EXCHANGE) {
+ throw new \LogicException("This medal can not be buy.");
+ }
$requireBonus = $medal->price;
NexusDB::transaction(function () use ($user, $medal, $requireBonus) {
$comment = nexus_trans('bonus.comment_buy_medal', [
diff --git a/include/constants.php b/include/constants.php
index 261acffe..36b4c666 100644
--- a/include/constants.php
+++ b/include/constants.php
@@ -1,6 +1,6 @@
]
[]:
'.$lang_functions['text_attended'].'', $attendance->points, $CURUSER['attendance_card']); }else{ printf(' %s', $lang_functions['text_attendance']);}?>
+ []
[]: where('inviter', $CURUSER['id'])->where('invitee', '')->where('expired_at', '>', now())->count())?>
= \App\Models\User::CLASS_ADMINISTRATOR) printf('[%s]', nexus_env('FILAMENT_PATH', 'nexusphp'), $lang_functions['text_management_system'])?>
@@ -2671,7 +2672,7 @@ else {
%s]', $CURUSER['id'], (new \App\Repositories\ClaimRepository())->getStats($CURUSER['id']))?>
-
+