Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mzhelskiy committed Oct 13, 2016
1 parent f1d353c commit 474866d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions classes/engine/EntityORM.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,9 @@ public function __call($sName, $aArgs)
$aFilterAdd = $aRelations[$sKey]['filter'];
$sCmd = "{$sRelPluginPrefix}{$sRelModuleName}_get{$sRelEntityName}ByFilter";
$aFilterAdd = array_merge(array($sRelationKey => $iPrimaryKeyValue), $aFilterAdd);
if ($bUseFilter) {
$aFilterAdd = array_merge($aFilterAdd, $aArgs[0]);
}
$mCmdArgs = array($aFilterAdd);
break;
case self::RELATION_TYPE_HAS_MANY :
Expand Down
6 changes: 5 additions & 1 deletion frontend/components/more/js/more.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,14 @@

// Обновляем счетчик
var countLeft = this.getCount() - response.count_loaded;
if ('undefined' !== typeof response.count_left) {
countLeft = response.count_left;
}

if ( countLeft <= 0 ) {
response.hide = true;
} else {
this.setCount( countLeft || 0 );
this.setCount( countLeft || 0);
}

// Обновляем параметры
Expand All @@ -132,6 +135,7 @@
} else {
// Для блоков без счетчиков
ls.msg.notice( null, this._i18n( 'empty' ) );
response.hide = true;
}

if ( response.hide ) {
Expand Down

0 comments on commit 474866d

Please sign in to comment.