From 7e9272c5bacc90c983922d6c16f49d27fe857fad Mon Sep 17 00:00:00 2001 From: SofianeLasri <alasri250@gmail.com> Date: Sat, 15 Jan 2022 15:57:10 +0100 Subject: [PATCH] fix --- pages/client/shops.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/client/shops.php b/pages/client/shops.php index fe7486b1..05ca5926 100644 --- a/pages/client/shops.php +++ b/pages/client/shops.php @@ -89,9 +89,9 @@ // Si l'item possède un nom custom, on va l'afficher if($shop['item']->getDisplayName() != null){ - $displayName = '<i class="icon-minecraft icon-minecraft-name-tag"></i> '.(strlen($shop['item']->getLabel()) > 22) ? substr($shop['item']->getLabel(),0,19).'...' : $shop['item']->getLabel(); + $displayName = '<i class="icon-minecraft icon-minecraft-name-tag"></i> '; + $displayName .= (strlen($shop['item']->getDisplayName()) > 22) ? substr($shop['item']->getDisplayName(),0,19).'...' : $shop['item']->getDisplayName() }else{ - $displayName = $shop['item']->getLabel(); } @@ -101,7 +101,7 @@ } $shopId = getRandomString(4); - echo ('<div class="col-3 mb-2" id="'.$shopId.'" x="'.$shop['x'].'" y="'.$shop['y'].'" z="'.$shop['z'].'" world="'.$shop['world'].'" displayName"'.$shop['item']->getDisplayName().'" enchants="'.json_encode($shop['item']->getEnchants()).'"> + echo ('<div class="col-3 mb-2" id="'.$shopId.'" x="'.$shop['x'].'" y="'.$shop['y'].'" z="'.$shop['z'].'" world="'.$shop['world'].'" displayName"'.$shop['item']->getDisplayName().'" enchants="'.json_encode($shop['item']->getEnchants()).'" type="'.json_encode($shop['item']->getId()).'"> <div class="card" style="width: 18rem;"> <div class="card-body"> <span class="badge badge-'.$badge.'">Stock: '.$shop['stock'].'</span> -- GitLab