Commit ffedcae5cd50daaac9f581bb60f1c796c2ef64b7
1 parent
e294f9d1
Import browser beta v0.1
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
common/modules/language/behaviors/LanguageBehavior.php
@@ -250,6 +250,7 @@ | @@ -250,6 +250,7 @@ | ||
250 | */ | 250 | */ |
251 | $owner = $this->owner; | 251 | $owner = $this->owner; |
252 | $db = $owner::getDb(); | 252 | $db = $owner::getDb(); |
253 | + $this->_transaction_status = false; | ||
253 | $this->_transaction = $db->beginTransaction(); | 254 | $this->_transaction = $db->beginTransaction(); |
254 | 255 | ||
255 | } | 256 | } |
@@ -265,7 +266,6 @@ | @@ -265,7 +266,6 @@ | ||
265 | if($this->linkLangs() && $this->saveLangs()) { | 266 | if($this->linkLangs() && $this->saveLangs()) { |
266 | $this->_transaction->commit(); | 267 | $this->_transaction->commit(); |
267 | $this->_transaction_status = true; | 268 | $this->_transaction_status = true; |
268 | - $owner->setIsNewRecord(false); | ||
269 | } else { | 269 | } else { |
270 | $this->_transaction->rollBack(); | 270 | $this->_transaction->rollBack(); |
271 | $this->_transaction_status = false; | 271 | $this->_transaction_status = false; |
@@ -273,8 +273,8 @@ | @@ -273,8 +273,8 @@ | ||
273 | } else { | 273 | } else { |
274 | $this->_transaction->commit(); | 274 | $this->_transaction->commit(); |
275 | $this->_transaction_status = true; | 275 | $this->_transaction_status = true; |
276 | - $owner->setIsNewRecord(false); | ||
277 | } | 276 | } |
277 | + unset($this->_transaction); | ||
278 | if($owner->hasAttribute('remote_id') && empty($owner->remote_id)) { | 278 | if($owner->hasAttribute('remote_id') && empty($owner->remote_id)) { |
279 | $owner->remote_id = (int) $owner->primaryKey(); | 279 | $owner->remote_id = (int) $owner->primaryKey(); |
280 | } | 280 | } |