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(); $entries = array();
$fcount = 0; $fcount = 0;
if($resArr['folders']) { if(!isset($_GET['action']) || $_GET['action'] != 'export') {
foreach ($resArr['folders'] as $entry) { if($resArr['folders']) {
if ($entry->getAccessMode($user) >= M_READ) { foreach ($resArr['folders'] as $entry) {
$entries[] = $entry; if ($entry->getAccessMode($user) >= M_READ) {
$fcount++; $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); $totalPages = (int) (count($entries)/$limit);
if(count($entries)%$limit) if(count($entries)%$limit)
$totalPages++; $totalPages++;
$entries = array_slice($entries, ($pageNumber-1)*$limit, $limit); // $entries = array_slice($entries, ($pageNumber-1)*$limit, $limit);
} else }
$totalPages = 1;
// }}} // }}}
} }