Skip to content

Commit 03c118b

Browse files
committed
No need to set a variable for these hardcoded values.
1 parent 9d45bf2 commit 03c118b

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

admin/Default/box_reply_processing.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
SmrPlayer::sendMessageFromAdmin($var['game_id'], $var['sender_id'], $_REQUEST['message']);
1515
//do we have points?
1616
if ($_REQUEST['BanPoints']) {
17-
$reasonID = 7;
1817
$suspicion = 'Inappropriate Actions';
1918
$senderAccount =& SmrAccount::getAccount($var['sender_id']);
20-
$senderAccount->addPoints($_REQUEST['BanPoints'],$account,$reasonID,$suspicion);
19+
$senderAccount->addPoints($_REQUEST['BanPoints'],$account,7,$suspicion);
2120
}
2221
}
2322
forward(create_container('skeleton.php', 'box_view.php'));

admin/Default/notify_reply_processing.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
if(!empty($offenderReply))
1111
$container['PreviewOffender'] = $offenderReply;
1212
$container['OffenderBanPoints'] = $_REQUEST['offenderBanPoints'];
13-
13+
1414
if(!empty($offendedReply))
1515
$container['PreviewOffended'] = $offendedReply;
1616
$container['OffendedBanPoints'] = $_REQUEST['offendedBanPoints'];
@@ -20,13 +20,12 @@
2020

2121
if (isset($offenderReply) && $offenderReply != '') {
2222
SmrPlayer::sendMessageFromAdmin($var['game_id'], $var['offender'], $offenderReply);
23-
23+
2424
//do we have points?
2525
if ($_REQUEST['offenderBanPoints']) {
26-
$reasonID = 7;
2726
$suspicion = 'Inappropriate In-Game Message';
2827
$offenderAccount =& SmrAccount::getAccount($var['offender']);
29-
$offenderAccount->addPoints($_REQUEST['offenderBanPoints'],$account,$reasonID,$suspicion);
28+
$offenderAccount->addPoints($_REQUEST['offenderBanPoints'],$account,7,$suspicion);
3029
}
3130
}
3231
if (isset($_REQUEST['offendedReply'])) $offendedReply = $_REQUEST['offendedReply'];
@@ -37,10 +36,9 @@
3736

3837
//do we have points?
3938
if ($_REQUEST['offendedBanPoints']) {
40-
$reasonID = 7;
4139
$suspicion = 'Inappropriate In-Game Message';
4240
$offenderAccount =& SmrAccount::getAccount($var['offended']);
43-
$offenderAccount->addPoints($_REQUEST['offendedBanPoints'],$account,$reasonID,$suspicion);
41+
$offenderAccount->addPoints($_REQUEST['offendedBanPoints'],$account,7,$suspicion);
4442
}
4543
}
4644
forward(create_container('skeleton.php', 'notify_view.php'));

0 commit comments

Comments
 (0)