From a454a9188529367c69b099c3c9f1e0690bc38e5d Mon Sep 17 00:00:00 2001 From: yarik Date: Wed, 12 Oct 2016 13:58:16 +0300 Subject: [PATCH] Import browser beta v0.1 --- common/modules/language/behaviors/LanguageBehavior.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/modules/language/behaviors/LanguageBehavior.php b/common/modules/language/behaviors/LanguageBehavior.php index 5723934..ece391a 100755 --- a/common/modules/language/behaviors/LanguageBehavior.php +++ b/common/modules/language/behaviors/LanguageBehavior.php @@ -237,7 +237,7 @@ $model_langs = $this->model_langs; foreach($model_langs as $model_lang) { if(!$model_lang->save(false)) { - $success = false; +// $success = false; } } return $success; @@ -250,7 +250,7 @@ */ $owner = $this->owner; $db = $owner::getDb(); -// $this->_transaction = $db->beginTransaction(); + $this->_transaction = $db->beginTransaction(); } public function afterSave($event) @@ -261,14 +261,14 @@ $owner = $this->owner; if(!empty( $this->model_langs )) { if($this->linkLangs() && $this->saveLangs()) { -// $this->_transaction->commit(); + $this->_transaction->commit(); $this->_transaction_status = true; } else { -// $this->_transaction->rollBack(); + $this->_transaction->rollBack(); $this->_transaction_status = false; } } else { -// $this->_transaction->commit(); + $this->_transaction->commit(); $this->_transaction_status = true; } if($owner->hasAttribute('remote_id') && empty($owner->remote_id)) { -- libgit2 0.21.4