Commit 86a137c01952ae1b2063171d1a474a1a0a89c853

Authored by Yarik
1 parent 2e91abdd

Import browser beta v0.1

common/modules/language/behaviors/LanguageBehavior.php
... ... @@ -236,7 +236,7 @@
236 236 $success = true;
237 237 $model_langs = $this->model_langs;
238 238 foreach($model_langs as $model_lang) {
239   - if(!$model_lang->save(false)) {
  239 + if(!$model_lang->save(false) !== false) {
240 240 $success = false;
241 241 }
242 242 }
... ... @@ -260,6 +260,7 @@
260 260 * @var ActiveRecord $owner
261 261 */
262 262 $owner = $this->owner;
  263 +
263 264 if(!empty( $this->model_langs )) {
264 265 if($this->linkLangs() && $this->saveLangs()) {
265 266 $this->_transaction->commit();
... ... @@ -273,9 +274,8 @@
273 274 $this->_transaction_status = true;
274 275 }
275 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 363  
364 364 if(Yii::$app->request->isAjax) {
365 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  
... ...