Skip to content

Commit

Permalink
Item3931: and when we're not paging, these are undefined..
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@4736 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
SvenDowideit authored and SvenDowideit committed Aug 31, 2009
1 parent c538ce6 commit 8200c96
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/lib/Foswiki/Search.pm
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,8 @@ sub formatResults {
$limit = 0;
}
$limit = 32000 unless ($limit);
if ($params->{pager_show_results_to} > 0) {
if (defined($params->{pager_show_results_to}) and
$params->{pager_show_results_to} > 0) {
$limit = $params->{pager_show_results_to};
}

Expand Down Expand Up @@ -772,7 +773,8 @@ sub formatResults {
while ( $infoCache->hasNext() ) {
my $topic = $infoCache->next();
#pager..
if ($params->{pager_skip_results_from} > 0) {
if (defined($params->{pager_skip_results_from}) and
$params->{pager_skip_results_from} > 0) {
$params->{pager_skip_results_from}--;
next;
}
Expand Down

0 comments on commit 8200c96

Please sign in to comment.