mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-31 14:07:16 +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"];
|
$pageNumber = (int) $_GET["pg"];
|
||||||
}
|
}
|
||||||
elseif (!strcasecmp($_GET["pg"], "all")) {
|
elseif (!strcasecmp($_GET["pg"], "all")) {
|
||||||
$limit = 0;
|
// $limit = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -385,7 +385,7 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) {
|
||||||
$totalPages = (int) (count($entries)/$limit);
|
$totalPages = (int) (count($entries)/$limit);
|
||||||
if(count($entries)%$limit)
|
if(count($entries)%$limit)
|
||||||
$totalPages++;
|
$totalPages++;
|
||||||
if($limit > 0)
|
if (strcasecmp($_GET["pg"], "all"))
|
||||||
$entries = array_slice($entries, ($pageNumber-1)*$limit, $limit);
|
$entries = array_slice($entries, ($pageNumber-1)*$limit, $limit);
|
||||||
// }}}
|
// }}}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user