Перенос специализированных методов из глобального класса в более узкий.
This commit is contained in:
@@ -22,12 +22,16 @@ class InventoryItem extends Item
|
||||
|
||||
public function printImage()
|
||||
{
|
||||
if (in_array($this->item_type, range(1,12))) {
|
||||
echo "<a href=/main.php?edit=1&dress={$this->item_id} title='Надеть'>";
|
||||
parent::printImage();
|
||||
echo "</a>";
|
||||
if (in_array($this->item_type, range(1, 12))) {
|
||||
echo <<<HTML
|
||||
<a href=/main.php?edit=1&dress={$this->item_id} title='Надеть'>
|
||||
<img src="/i/sh/{$this->image}" class="item-wrap-normal" alt="">
|
||||
</a>
|
||||
HTML;
|
||||
} else {
|
||||
parent::printImage();
|
||||
echo <<<IMG
|
||||
<img src="/i/sh/{$this->image}" class="item-wrap-normal" alt="">
|
||||
IMG;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user