mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-30 05:27:32 +00:00
fix division by zero if all hits are shown
This commit is contained in:
parent
c0fa5d9cc6
commit
1b8f515d7b
|
@ -352,7 +352,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) {
|
|||
$pageNumber = (int) $_GET["pg"];
|
||||
}
|
||||
elseif (!strcasecmp($_GET["pg"], "all")) {
|
||||
$limit = 0;
|
||||
// $limit = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -385,7 +385,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) {
|
|||
$totalPages = (int) (count($entries)/$limit);
|
||||
if(count($entries)%$limit)
|
||||
$totalPages++;
|
||||
if($limit > 0)
|
||||
if (strcasecmp($_GET["pg"], "all"))
|
||||
$entries = array_slice($entries, ($pageNumber-1)*$limit, $limit);
|
||||
// }}}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user