Commit a454a9188529367c69b099c3c9f1e0690bc38e5d

Authored by Yarik
1 parent d17feca7

Import browser beta v0.1

Showing 1 changed file with 5 additions and 5 deletions   Show diff stats
common/modules/language/behaviors/LanguageBehavior.php
... ... @@ -237,7 +237,7 @@
237 237 $model_langs = $this->model_langs;
238 238 foreach($model_langs as $model_lang) {
239 239 if(!$model_lang->save(false)) {
240   - $success = false;
  240 +// $success = false;
241 241 }
242 242 }
243 243 return $success;
... ... @@ -250,7 +250,7 @@
250 250 */
251 251 $owner = $this->owner;
252 252 $db = $owner::getDb();
253   -// $this->_transaction = $db->beginTransaction();
  253 + $this->_transaction = $db->beginTransaction();
254 254 }
255 255  
256 256 public function afterSave($event)
... ... @@ -261,14 +261,14 @@
261 261 $owner = $this->owner;
262 262 if(!empty( $this->model_langs )) {
263 263 if($this->linkLangs() && $this->saveLangs()) {
264   -// $this->_transaction->commit();
  264 + $this->_transaction->commit();
265 265 $this->_transaction_status = true;
266 266 } else {
267   -// $this->_transaction->rollBack();
  267 + $this->_transaction->rollBack();
268 268 $this->_transaction_status = false;
269 269 }
270 270 } else {
271   -// $this->_transaction->commit();
  271 + $this->_transaction->commit();
272 272 $this->_transaction_status = true;
273 273 }
274 274 if($owner->hasAttribute('remote_id') && empty($owner->remote_id)) {
... ...