Changeset 357 for branches/stable/cgi-bin
- Timestamp:
- 02/14/07 13:03:31 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/cgi-bin/search.cgi
r323 r357 40 40 my %webvar = parse_post(); 41 41 cleanInput(\%webvar); 42 43 if (defined($webvar{rpp})) { 44 ($RESULTS_PER_PAGE) = ($webvar{rpp} =~ /(\d+)/); 45 } 42 46 43 47 if (!defined($webvar{stype})) { … … 185 189 } else { 186 190 # Add the limit/offset clauses 187 $sql .= " order by cidr limit $RESULTS_PER_PAGE offset $offset"; 191 $sql .= " order by cidr"; 192 $sql .= " limit $RESULTS_PER_PAGE offset $offset" if $RESULTS_PER_PAGE != 0; 188 193 # And tell the user. 189 194 print "<div class=heading>Searching...............</div>\n"; … … 420 425 421 426 # print the page thing.. 422 if ($ rowCount > $RESULTS_PER_PAGE) {427 if ($RESULTS_PER_PAGE > 0 && $rowCount > $RESULTS_PER_PAGE) { 423 428 my $pages = ceil($rowCount/$RESULTS_PER_PAGE); 424 429 print qq(<div class="center"> Page: );
Note:
See TracChangeset
for help on using the changeset viewer.