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 | 250 | */ |
| 251 | 251 | $owner = $this->owner; |
| 252 | 252 | $db = $owner::getDb(); |
| 253 | + $this->_transaction_status = false; | |
| 253 | 254 | $this->_transaction = $db->beginTransaction(); |
| 254 | 255 | |
| 255 | 256 | } |
| ... | ... | @@ -265,7 +266,6 @@ |
| 265 | 266 | if($this->linkLangs() && $this->saveLangs()) { |
| 266 | 267 | $this->_transaction->commit(); |
| 267 | 268 | $this->_transaction_status = true; |
| 268 | - $owner->setIsNewRecord(false); | |
| 269 | 269 | } else { |
| 270 | 270 | $this->_transaction->rollBack(); |
| 271 | 271 | $this->_transaction_status = false; |
| ... | ... | @@ -273,8 +273,8 @@ |
| 273 | 273 | } else { |
| 274 | 274 | $this->_transaction->commit(); |
| 275 | 275 | $this->_transaction_status = true; |
| 276 | - $owner->setIsNewRecord(false); | |
| 277 | 276 | } |
| 277 | + unset($this->_transaction); | |
| 278 | 278 | if($owner->hasAttribute('remote_id') && empty($owner->remote_id)) { |
| 279 | 279 | $owner->remote_id = (int) $owner->primaryKey(); |
| 280 | 280 | } | ... | ... |