From c27effc04eb8cf52af3ac976326f4c314f619002 Mon Sep 17 00:00:00 2001 From: Enrique Erne Date: Tue, 9 Jul 2013 13:35:49 +0200 Subject: [PATCH] lastCls fix #23 Only set $totalCount if $limit is not 0 (defaults to 0) --- .../filelister/elements/snippets/snippet.filelister.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/components/filelister/elements/snippets/snippet.filelister.php b/core/components/filelister/elements/snippets/snippet.filelister.php index 3e58077..af80f02 100644 --- a/core/components/filelister/elements/snippets/snippet.filelister.php +++ b/core/components/filelister/elements/snippets/snippet.filelister.php @@ -227,7 +227,7 @@ /* get templated chunks for each fs resource */ $i = 0; $totalCount = count($directories) + count($files); -if ($totalCount > $limit) $totalCount = $limit; /* getPage compat */ +if ($totalCount > $limit && $limit > 0) $totalCount = $limit; /* getPage compat */ foreach ($directories as $directory) { $odd = $i % 2; $directory['cls'] = $odd ? $altCls : $cls; @@ -289,4 +289,4 @@ $modx->setPlaceholder($toPlaceholder,$output); return ''; } -return $output; \ No newline at end of file +return $output;