mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
POtential fix for browse page ordering
This commit is contained in:
@@ -19,11 +19,11 @@ class BrowseController extends BasePageController
|
||||
|
||||
$this->smarty->assign('category', -1);
|
||||
|
||||
$orderby = '';
|
||||
$orderBy = request()->has('ob') && ! empty(request()->input('ob')) ? request()->input('ob') : '';
|
||||
$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'), $orderby, -1, $this->userdata->categoryexclusions, -1);
|
||||
$rslt = $releases->getBrowseRange($page, [-1], $offset, config('nntmux.items_per_page'), $orderBy, -1, $this->userdata->categoryexclusions, -1);
|
||||
$results = $this->paginate($rslt ?? [], $rslt[0]->_totalcount ?? 0, config('nntmux.items_per_page'), $page, request()->url(), request()->query());
|
||||
|
||||
$this->smarty->assign('catname', 'All');
|
||||
@@ -79,11 +79,11 @@ class BrowseController extends BasePageController
|
||||
$this->smarty->assign('parentcat', ucfirst($parentCategory));
|
||||
$this->smarty->assign('category', $category);
|
||||
|
||||
$orderby = '';
|
||||
$orderBy = '';
|
||||
$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, $catarray, $offset, config('nntmux.items_per_page'), $orderby, -1, $this->userdata->categoryexclusions, $grp);
|
||||
$rslt = $releases->getBrowseRange($page, $catarray, $offset, config('nntmux.items_per_page'), $orderBy, -1, $this->userdata->categoryexclusions, $grp);
|
||||
$results = $this->paginate($rslt ?? [], $rslt[0]->_totalcount ?? 0, config('nntmux.items_per_page'), $page, request()->url(), request()->query());
|
||||
|
||||
$browse = [];
|
||||
|
||||
Reference in New Issue
Block a user