From baf127231e94772d3bbf08cf9bc57721433bd3cd Mon Sep 17 00:00:00 2001 From: "Igor Barkov (iwork)" Date: Fri, 21 Jan 2022 17:05:12 +0200 Subject: [PATCH] =?UTF-8?q?#49:=20=D0=9E=D0=B4=D0=BD=D0=B0=D0=B6=D0=B4?= =?UTF-8?q?=D1=8B=20=D0=B2=D1=8B=D1=81=D1=82=D0=B0=D0=B2=D0=B8=D0=B2=20?= =?UTF-8?q?=D0=B2=D0=B5=D1=89=D1=8C=20=D0=BD=D0=B0=20=D0=BF=D1=80=D0=BE?= =?UTF-8?q?=D0=B4=D0=B0=D0=B6=D1=83=20=D0=B5=D1=91=20=D0=BD=D0=B5=D0=BB?= =?UTF-8?q?=D1=8C=D0=B7=D1=8F=20=D0=B7=D0=B0=D0=B1=D1=80=D0=B0=D1=82=D1=8C?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/Battles/ShopItem.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/classes/Battles/ShopItem.php b/classes/Battles/ShopItem.php index fb37581..84ceefb 100644 --- a/classes/Battles/ShopItem.php +++ b/classes/Battles/ShopItem.php @@ -13,7 +13,6 @@ class ShopItem extends Item private const NO_BARTER_ITEMS = 'У вас нет требуемых предметов!'; private const BUTTON = [ 'setmarket' => 'Сдать в магазин', - 'unsetmarket' => 'Снять с продажи', 'buymarket' => 'Купить с рук', 'sellshop' => 'Продать', 'buyshop' => 'Купить', @@ -252,13 +251,10 @@ SQL; */ public function printControls(): string { - if (!in_array($this->optype, ['setmarket', 'unsetmarket', 'buymarket', 'sellshop', 'buyshop',])) { + if (!in_array($this->optype, ['setmarket', 'buymarket', 'sellshop', 'buyshop',])) { return ''; } $str = $this->optype == 'setmarket' ? '' : ''; - if ($this->optype === 'buymarket' && $this->ownerId === User::$current->getId()) { - $this->optype = 'unsetmarket'; - } $hiddenValue = $this->optype === 'buyshop' ? $this->offerId : $this->item_id; $button_name = self::BUTTON[$this->optype]; return <<