mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Prevent errors if no results for cover view are returned
This commit is contained in:
@@ -28,7 +28,7 @@ class BrowseController extends BasePageController
|
||||
$offset = ($page - 1) * config('nntmux.items_per_page');
|
||||
|
||||
$rslt = $releases->getBrowseRange($page, [-1], $offset, config('nntmux.items_per_page'), $orderby, -1, $this->userdata['categoryexclusions'], -1);
|
||||
$results = $this->paginate($rslt, $rslt['_totalcount'], config('nntmux.items_per_page'), $page, request()->url(), request()->query());
|
||||
$results = $this->paginate($rslt ?? [], $rslt['_totalcount'] ?? 0, config('nntmux.items_per_page'), $page, request()->url(), request()->query());
|
||||
|
||||
$this->smarty->assign('catname', 'All');
|
||||
|
||||
@@ -85,7 +85,7 @@ class BrowseController extends BasePageController
|
||||
$offset = ($page - 1) * config('nntmux.items_per_page');
|
||||
|
||||
$rslt = $releases->getBrowseRange($page, $catarray, $offset, config('nntmux.items_per_page'), $orderby, -1, $this->userdata['categoryexclusions'], $grp);
|
||||
$results = $this->paginate($rslt, $rslt['_totalcount'], config('nntmux.items_per_page'), $page, request()->url(), request()->query());
|
||||
$results = $this->paginate($rslt ?? [], $rslt['_totalcount'] ?? 0, config('nntmux.items_per_page'), $page, request()->url(), request()->query());
|
||||
|
||||
$this->smarty->assign('catname', title_case($id));
|
||||
|
||||
@@ -147,7 +147,7 @@ class BrowseController extends BasePageController
|
||||
$page = request()->has('page') && is_numeric(request()->input('page')) ? request()->input('page') : 1;
|
||||
$offset = ($page - 1) * config('nntmux.items_per_page');
|
||||
$rslt = $releases->getBrowseRange($page, [-1], $offset, config('nntmux.items_per_page'), '', -1, $this->userdata['categoryexclusions'], $group);
|
||||
$results = $this->paginate($rslt, $rslt['_totalcount'], config('nntmux.items_per_page'), $page, request()->url(), request()->query());
|
||||
$results = $this->paginate($rslt ?? [], $rslt['_totalcount'] ?? 0, config('nntmux.items_per_page'), $page, request()->url(), request()->query());
|
||||
$this->smarty->assign('results', $results);
|
||||
$meta_title = 'Browse Groups';
|
||||
$meta_keywords = 'browse,nzb,description,details';
|
||||
|
||||
Reference in New Issue
Block a user