Commit 7cdb08941d50419f6388bed8225ceb39ec5a1d57
1 parent
2214350f
Some fixes
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
backend/controllers/BrandController.php
@@ -28,7 +28,7 @@ class BrandController extends Controller | @@ -28,7 +28,7 @@ class BrandController extends Controller | ||
28 | 'allow' => true, | 28 | 'allow' => true, |
29 | ], | 29 | ], |
30 | [ | 30 | [ |
31 | - 'actions' => ['logout', 'index'], | 31 | + 'actions' => ['logout', 'index', 'create', 'update', 'view', 'delete'], |
32 | 'allow' => true, | 32 | 'allow' => true, |
33 | 'roles' => ['@'], | 33 | 'roles' => ['@'], |
34 | ], | 34 | ], |
common/modules/product/models/Product.php
@@ -142,7 +142,7 @@ class Product extends \yii\db\ActiveRecord | @@ -142,7 +142,7 @@ class Product extends \yii\db\ActiveRecord | ||
142 | 142 | ||
143 | public function getFullName() | 143 | public function getFullName() |
144 | { | 144 | { |
145 | - return $this->brand->name .' '. $this->name; | 145 | + return empty($this->brand) ? $this->name : $this->brand->name .' '. $this->name; |
146 | } | 146 | } |
147 | 147 | ||
148 | public function getCategories() { | 148 | public function getCategories() { |