From d0497b16063ad39517d87a73028f5e00b8ae2892 Mon Sep 17 00:00:00 2001 From: lopar Date: Mon, 14 Jan 2019 23:44:33 +0200 Subject: [PATCH] tests --- classes/ShopItem.php | 10 +++------- test.php | 1 - 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/classes/ShopItem.php b/classes/ShopItem.php index 0444c14..277d21e 100644 --- a/classes/ShopItem.php +++ b/classes/ShopItem.php @@ -2,15 +2,10 @@ class ShopItem extends Item { - public $count; - public $razdel; - public $ecost; - public $zeton; - public $onlyone; - public $shshop; - public function printInfo() { + if (self::printControls(true)) $this->maxdur = 0; + parent::printBaseInfo(); parent::printRequirements(); parent::printBonuses(); @@ -25,6 +20,7 @@ class ShopItem extends Item if ($sell) { $btnPrice = "Продать"; $btnLink = "/shop.php?sell={$this->id}&rnd=".mt_rand(); + $this->maxdur = 0; } else { $btnPrice = "Купить за " . intval($this->cost) . " кр."; $btnLink = "/shop.php?buy={$this->id}&rnd=" . mt_rand(); diff --git a/test.php b/test.php index 1821250..d96eb9a 100644 --- a/test.php +++ b/test.php @@ -46,7 +46,6 @@ foreach ($iteminfo as $ii) { echo ""; $ii->printImage(); $ii->printControls(); - echo $this->printControls(); echo ""; echo ""; $ii->printInfo();