mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 03:01:34 +00:00
Update Books class getBookRange function and BooksController
This commit is contained in:
@@ -37,7 +37,8 @@ class BooksController extends BasePageController
|
||||
$orderby = $request->has('ob') && \in_array($request->input('ob'), $ordering, false) ? $request->input('ob') : '';
|
||||
|
||||
$books = [];
|
||||
$results = $book->getBookRange($catarray, $orderby, $this->userdata['categoryexclusions']);
|
||||
$page = $request->has('page') ? $request->input('page') : 1;
|
||||
$results = $book->getBookRange($page, $catarray, $orderby, $this->userdata['categoryexclusions']);
|
||||
|
||||
$maxwords = 50;
|
||||
foreach ($results as $result) {
|
||||
@@ -59,15 +60,6 @@ class BooksController extends BasePageController
|
||||
|
||||
$browseby_link = '&title='.$title.'&author='.$author;
|
||||
|
||||
$this->smarty->assign('pagertotalitems', $results[0]['_totalcount'] ?? 0);
|
||||
$this->smarty->assign('pageroffset', $offset);
|
||||
$this->smarty->assign('pageritemsperpage', config('nntmux.items_per_cover_page'));
|
||||
$this->smarty->assign('pagerquerybase', WWW_TOP.'/books?t='.$category.$browseby_link.'&ob='.$orderby.'&offset=');
|
||||
$this->smarty->assign('pagerquerysuffix', '#results');
|
||||
|
||||
$pager = $this->smarty->fetch('pager.tpl');
|
||||
$this->smarty->assign('pager', $pager);
|
||||
|
||||
if ((int) $category === -1) {
|
||||
$this->smarty->assign('catname', 'All');
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user