export always returns all items, fix display of 2nd, 3rd, ... page

This commit is contained in:
Uwe Steinmann 2018-01-23 16:42:25 +01:00
parent 5b5e9af891
commit 81b8d2ae1b

View File

@ -379,11 +379,13 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSe
$entries = array();
$fcount = 0;
if($resArr['folders']) {
foreach ($resArr['folders'] as $entry) {
if ($entry->getAccessMode($user) >= M_READ) {
$entries[] = $entry;
$fcount++;
if(!isset($_GET['action']) || $_GET['action'] != 'export') {
if($resArr['folders']) {
foreach ($resArr['folders'] as $entry) {
if ($entry->getAccessMode($user) >= M_READ) {
$entries[] = $entry;
$fcount++;
}
}
}
}
@ -399,13 +401,13 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"] && $settings->_enableFullSe
}
}
}
if (!isset($_GET["pg"]) || strcasecmp($_GET["pg"], "all")) {
$totalPages = 1;
if ((!isset($_GET['action']) || $_GET['action'] != 'export') && (!isset($_GET["pg"]) || strcasecmp($_GET["pg"], "all"))) {
$totalPages = (int) (count($entries)/$limit);
if(count($entries)%$limit)
$totalPages++;
$entries = array_slice($entries, ($pageNumber-1)*$limit, $limit);
} else
$totalPages = 1;
// $entries = array_slice($entries, ($pageNumber-1)*$limit, $limit);
}
// }}}
}