code clean

This commit is contained in:
Igor Barkov (iwork)
2021-08-26 19:15:47 +03:00
parent 5e264f837a
commit 9c7fcda600
5 changed files with 74 additions and 68 deletions
+4 -3
View File
@@ -5,6 +5,7 @@ use Battles\Database\DBPDO;
use Battles\Item;
use Battles\ShopItem;
use Battles\Template;
use Battles\User;
require_once 'functions.php';
$saleItems = false;
@@ -13,14 +14,14 @@ $shopCategoryTypeNumber = $_GET['otdel'] ?? 0;
$status = null;
if (!empty($_POST['sellshop'])) {
$status = ShopItem::sellItem($_POST['itemId'], $user, 1);
$status = ShopItem::sellItem($_POST['itemId'], User::$current, 1);
}
if (!empty($_POST['buyshop'])) {
$status = ShopItem::buyItem($_POST['itemId'], $user);
$status = ShopItem::buyItem($_POST['itemId'], User::$current);
}
$bank = new Bank($user->getId());
$bank = new Bank(User::$current->getId());
switch ($shopCategoryTypeNumber) {
default: