Commit 86a137c01952ae1b2063171d1a474a1a0a89c853

Authored by Yarik
1 parent 2e91abdd

Import browser beta v0.1

common/modules/language/behaviors/LanguageBehavior.php
@@ -236,7 +236,7 @@ @@ -236,7 +236,7 @@
236 $success = true; 236 $success = true;
237 $model_langs = $this->model_langs; 237 $model_langs = $this->model_langs;
238 foreach($model_langs as $model_lang) { 238 foreach($model_langs as $model_lang) {
239 - if(!$model_lang->save(false)) { 239 + if(!$model_lang->save(false) !== false) {
240 $success = false; 240 $success = false;
241 } 241 }
242 } 242 }
@@ -260,6 +260,7 @@ @@ -260,6 +260,7 @@
260 * @var ActiveRecord $owner 260 * @var ActiveRecord $owner
261 */ 261 */
262 $owner = $this->owner; 262 $owner = $this->owner;
  263 +
263 if(!empty( $this->model_langs )) { 264 if(!empty( $this->model_langs )) {
264 if($this->linkLangs() && $this->saveLangs()) { 265 if($this->linkLangs() && $this->saveLangs()) {
265 $this->_transaction->commit(); 266 $this->_transaction->commit();
@@ -273,9 +274,8 @@ @@ -273,9 +274,8 @@
273 $this->_transaction_status = true; 274 $this->_transaction_status = true;
274 } 275 }
275 if($owner->hasAttribute('remote_id') && empty($owner->remote_id)) { 276 if($owner->hasAttribute('remote_id') && empty($owner->remote_id)) {
276 - $owner->remote_id = (int) $owner->primaryKey; 277 + $owner->remote_id = (int) $owner->primaryKey();
277 } 278 }
278 -  
279 } 279 }
280 280
281 /** 281 /**
common/modules/product/controllers/ManageController.php
@@ -363,7 +363,7 @@ @@ -363,7 +363,7 @@
363 363
364 if(Yii::$app->request->isAjax) { 364 if(Yii::$app->request->isAjax) {
365 Yii::$app->response->format = \yii\web\Response::FORMAT_JSON; 365 Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
366 - return $model->goProducts($from, 2); 366 + return $model->goProducts($from, 1);
367 } 367 }
368 } 368 }
369 369