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