Commit 7126d7a3d080de556fc423479eafd510c5ef678b
1 parent
8b4db6c1
Import browser beta v0.1
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
common/modules/language/behaviors/LanguageBehavior.php
| @@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
| 2 | namespace common\modules\language\behaviors; | 2 | namespace common\modules\language\behaviors; |
| 3 | 3 | ||
| 4 | use common\modules\language\models\Language; | 4 | use common\modules\language\models\Language; |
| 5 | + use common\modules\product\models\Product; | ||
| 5 | use yii\base\Behavior; | 6 | use yii\base\Behavior; |
| 6 | use yii\base\InvalidConfigException; | 7 | use yii\base\InvalidConfigException; |
| 7 | use yii\db\ActiveQuery; | 8 | use yii\db\ActiveQuery; |
| @@ -263,10 +264,12 @@ | @@ -263,10 +264,12 @@ | ||
| 263 | 264 | ||
| 264 | if(!empty( $this->model_langs )) { | 265 | if(!empty( $this->model_langs )) { |
| 265 | if($this->linkLangs() && $this->saveLangs()) { | 266 | if($this->linkLangs() && $this->saveLangs()) { |
| 267 | + if($owner instanceof Product) { | ||
| 268 | + var_dump($owner); die(); | ||
| 269 | + } | ||
| 266 | $this->_transaction->commit(); | 270 | $this->_transaction->commit(); |
| 267 | $this->_transaction_status = true; | 271 | $this->_transaction_status = true; |
| 268 | } else { | 272 | } else { |
| 269 | - var_dump($owner); die(); | ||
| 270 | $this->_transaction->rollBack(); | 273 | $this->_transaction->rollBack(); |
| 271 | $this->_transaction_status = false; | 274 | $this->_transaction_status = false; |
| 272 | } | 275 | } |