Update AdultController and XXX class

This commit is contained in:
DariusIII
2018-04-13 15:30:39 +02:00
parent ec0fec454e
commit b08c4d5114
4 changed files with 56 additions and 210 deletions
+2 -8
View File
@@ -33,12 +33,12 @@ class AdultController extends BasePageController
$this->smarty->assign('catlist', $mtmp);
$this->smarty->assign('category', $category);
$offset = ($request->has('offset') && ctype_digit($request->input('offset'))) ? $request->input('offset') : 0;
$ordering = $adult->getXXXOrdering();
$orderby = $request->has('ob') && \in_array($request->input('ob'), $ordering, false) ? $request->input('ob') : '';
$movies = [];
$results = $adult->getXXXRange($catarray, $offset, config('nntmux.items_per_cover_page'), $orderby, -1, $this->userdata['categoryexclusions']);
$page = $request->has('page') ? $request->input('page') : 1;
$results = $adult->getXXXRange($page, $catarray, $orderby, $this->userdata['categoryexclusions']);
foreach ($results as $result) {
$result['genre'] = makeFieldLinks($result, 'genre', 'xxx');
$result['actors'] = makeFieldLinks($result, 'actors', 'xxx');
@@ -61,12 +61,6 @@ class AdultController extends BasePageController
$browseby_link = '&title='.$title.'&actors='.$actors.'&director='.$director.'&genre='.$genre;
$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.'/xxx?t='.$category.$browseby_link.'&ob='.$orderby.'&offset=');
$this->smarty->assign('pagerquerysuffix', '#results');
$pager = $this->smarty->fetch('pager.tpl');
$this->smarty->assign('pager', $pager);