From ffedcae5cd50daaac9f581bb60f1c796c2ef64b7 Mon Sep 17 00:00:00 2001 From: yarik Date: Wed, 12 Oct 2016 15:10:40 +0300 Subject: [PATCH] Import browser beta v0.1 --- common/modules/language/behaviors/LanguageBehavior.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/modules/language/behaviors/LanguageBehavior.php b/common/modules/language/behaviors/LanguageBehavior.php index bae36b8..5391ca8 100755 --- a/common/modules/language/behaviors/LanguageBehavior.php +++ b/common/modules/language/behaviors/LanguageBehavior.php @@ -250,6 +250,7 @@ */ $owner = $this->owner; $db = $owner::getDb(); + $this->_transaction_status = false; $this->_transaction = $db->beginTransaction(); } @@ -265,7 +266,6 @@ if($this->linkLangs() && $this->saveLangs()) { $this->_transaction->commit(); $this->_transaction_status = true; - $owner->setIsNewRecord(false); } else { $this->_transaction->rollBack(); $this->_transaction_status = false; @@ -273,8 +273,8 @@ } else { $this->_transaction->commit(); $this->_transaction_status = true; - $owner->setIsNewRecord(false); } + unset($this->_transaction); if($owner->hasAttribute('remote_id') && empty($owner->remote_id)) { $owner->remote_id = (int) $owner->primaryKey(); } -- libgit2 0.21.4