Skip to content

Commit

Permalink
Merge pull request #12 from oveleon/develop
Browse files Browse the repository at this point in the history
Bugfix - Memberlist perPage error
  • Loading branch information
zoglo authored Aug 13, 2022
2 parents a5d4fa3 + 96dff33 commit 0060055
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Resources/contao/dca/tl_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
array_insert($GLOBALS['TL_DCA']['tl_module']['palettes'], 0, [
'avatar' => '{title_legend},name,headline,type;{source_legend},imgSize;{template_legend:hide},customTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID',
'deleteAvatar' => '{title_legend},name,headline,type;{template_legend:hide},customTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID',
'memberList' => '{title_legend},name,headline,type;{config_legend},ext_order,ext_orderField,,numberOfItems,perPage,ext_groups,memberFields,imgSize;{redirect_legend},jumpTo;{template_legend:hide},customTpl,memberListTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID',
'memberList' => '{title_legend},name,headline,type;{config_legend},ext_order,ext_orderField,numberOfItems,perPage,ext_groups,memberFields,imgSize;{redirect_legend},jumpTo;{template_legend:hide},customTpl,memberListTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID',
'memberReader' => '{title_legend},name,headline,type;{config_legend},ext_groups,memberFields,imgSize;{template_legend:hide},customTpl,memberReaderTpl;{protected_legend:hide},protected;{expert_legend:hide},guests,cssID'
]);

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/contao/modules/ModuleMemberList.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ protected function compile()
$limit = $total + $skip - $offset;
}

$arrMembers = \array_slice($arrMembers, $offset, ($limit ?: $intTotal), true);
$arrMembers = \array_slice($arrMembers, $offset, ((int) $limit ?: $intTotal), true);

$objPagination = new Pagination($total, $this->perPage, Config::get('maxPaginationLinks'), $id);
$this->Template->pagination = $objPagination->generate("\n ");
Expand Down

0 comments on commit 0060055

Please sign in to comment.