From: Vincent Vanwaelscappel Date: Mon, 30 Sep 2019 16:26:26 +0000 (+0200) Subject: fix #3091 @0:10 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=8f565050654dfb60d6a911319ab42454cf3e1b54;p=pmi.git fix #3091 @0:10 --- diff --git a/app/Models/Product.php b/app/Models/Product.php index 1db343e..2bf747b 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -278,9 +278,9 @@ class Product extends CubistMagicPageModel } $specValue = ' - '; - if ($specEntity->type == 'numeric' || $specEntity->type == 'numeric_list') { + if ($specEntity->type === 'numeric' || $specEntity->type === 'numeric_list') { $specValue = $specEntity->prefix; - if ($specEntity->type == 'numeric_list' && is_array($val)) { + if ($specEntity->type === 'numeric_list' && is_array($val)) { $specValue .= ' ' . implode(' ' . $specEntity->separator . ' ', $val); } else { if (is_array($val)) { @@ -289,14 +289,14 @@ class Product extends CubistMagicPageModel $specValue = $val; } $specValue .= ' ' . $specEntity->unit; - } else if ($specEntity->type == 'text') { + } else if ($specEntity->type === 'text') { $specValue = trim($val); - } else if ($specEntity->type == 'range') { + } else if ($specEntity->type === 'range') { if (!isset($val['first']) || !isset($val['second']) || (!$val['first'] && !$val['second'])) { continue; } $specValue = $val['first'] . ' ' . __('à') . ' ' . $val['second'] . ' ' . $specEntity->unit; - } else if ($specEntity->type == 'list') { + } else if ($specEntity->type === 'list') { if (is_array($val)) { continue; } diff --git a/app/Models/Specification.php b/app/Models/Specification.php index 0ba3d16..bca4d59 100644 --- a/app/Models/Specification.php +++ b/app/Models/Specification.php @@ -3,9 +3,9 @@ namespace App\Models; -use Cubist\Backpack\app\Magic\Models\CubistMagicAbstractModel; +use Cubist\Backpack\app\Magic\Models\CubistMagicTranslatableModel; -class Specification extends CubistMagicAbstractModel +class Specification extends CubistMagicTranslatableModel { protected $table = 'catalog_specifications';