Use function to call paginator

This commit is contained in:
DariusIII
2018-05-12 22:59:36 +02:00
parent e551a3b901
commit 3beb5f514e
9 changed files with 24 additions and 9 deletions
+3 -3
View File
@@ -29,7 +29,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 = new LengthAwarePaginator($rslt, $rslt['_totalcount'], config('nntmux.items_per_page'), $page, ['path' => \request()->url()]);
$results = $this->paginate($rslt, $rslt['_totalcount'], config('nntmux.items_per_page'), $page, request()->url());
$this->smarty->assign('catname', 'All');
@@ -86,7 +86,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 = new LengthAwarePaginator($rslt, $rslt['_totalcount'], config('nntmux.items_per_page'), $page, ['path' => \request()->url()]);
$results = $this->paginate($rslt, $rslt['_totalcount'], config('nntmux.items_per_page'), $page, request()->url());
$this->smarty->assign('catname', $id);
@@ -148,7 +148,7 @@ class BrowseController extends BasePageController
$page = \request()->has('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 = new LengthAwarePaginator($rslt, $rslt['_totalcount'], config('nntmux.items_per_page'), $page, ['path' => \request()->url()]);
$results = $this->paginate($rslt, $rslt['_totalcount'], config('nntmux.items_per_page'), $page, request()->url());
$this->smarty->assign('results', $results);
$meta_title = 'Browse Groups';
$meta_keywords = 'browse,nzb,description,details';