Commit 7cdb08941d50419f6388bed8225ceb39ec5a1d57

Authored by Karnovsky A
1 parent 2214350f

Some fixes

backend/controllers/BrandController.php
... ... @@ -28,7 +28,7 @@ class BrandController extends Controller
28 28 'allow' => true,
29 29 ],
30 30 [
31   - 'actions' => ['logout', 'index'],
  31 + 'actions' => ['logout', 'index', 'create', 'update', 'view', 'delete'],
32 32 'allow' => true,
33 33 'roles' => ['@'],
34 34 ],
... ...
common/modules/product/models/Product.php
... ... @@ -142,7 +142,7 @@ class Product extends \yii\db\ActiveRecord
142 142  
143 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 148 public function getCategories() {
... ...