Skip to content

Commit

Permalink
[Bugfix] Fixed a bug where displaying memeber lists with page limit d…
Browse files Browse the repository at this point in the history
…id not work
  • Loading branch information
zoglo committed Aug 13, 2022
1 parent 79c0f94 commit 96dff33
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 96dff33

Please sign in to comment.