Fix empty releases at bottom of browse pages

This commit is contained in:
DariusIII
2018-05-16 13:37:12 +02:00
parent f239302c9e
commit c2cab69593
6 changed files with 71 additions and 73 deletions
+14 -1
View File
@@ -87,11 +87,24 @@ class BrowseController extends BasePageController
$rslt = $releases->getBrowseRange($page, $catarray, $offset, config('nntmux.items_per_page'), $orderby, -1, $this->userdata['categoryexclusions'], $grp);
$results = $this->paginate($rslt ?? [], $rslt['_totalcount'] ?? 0, config('nntmux.items_per_page'), $page, request()->url(), request()->query());
$browse = [];
foreach ($results as $result) {
if (! empty($result->id)) {
$browse[] = $result;
}
}
$this->smarty->assign('catname', $id);
$this->smarty->assign('lastvisit', $this->userdata['lastlogin']);
$this->smarty->assign('results', $results);
$this->smarty->assign(
[
'results' => $results,
'resultsadd' => $browse,
]
);
$covgroup = '';
if ($category === -1 && $grp === -1) {