mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Fix category filter when searching for releases
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
2018-05-16 DariusIII
|
||||
* Fix: Fix category filter when searching for releases
|
||||
* Chg: Update release edit links in all themes
|
||||
* Fix: Fix movie view link from details page
|
||||
* Chg: Fix release details display error
|
||||
|
||||
@@ -107,12 +107,12 @@ class ApiController extends BasePageController
|
||||
|
||||
// Set Query Parameters based on Request objects
|
||||
$outputXML = ! ($request->has('o') && $request->input('o') === 'json');
|
||||
$minSize = ($request->has('minsize') && $request->input('minsize') > 0 ? $request->input('minsize') : 0);
|
||||
$minSize = $request->has('minsize') && $request->input('minsize') > 0 ? $request->input('minsize') : 0;
|
||||
$offset = $api->offset();
|
||||
|
||||
// Set API Parameters based on Request objects
|
||||
$params['extended'] = ($request->has('extended') && (int) $request->input('extended') === 1 ? '1' : '0');
|
||||
$params['del'] = ($request->has('del') && (int) $request->input('del') === 1 ? '1' : '0');
|
||||
$params['extended'] = $request->has('extended') && (int) $request->input('extended') === 1 ? '1' : '0';
|
||||
$params['del'] = $request->has('del') && (int) $request->input('del') === 1 ? '1' : '0';
|
||||
$params['uid'] = $uid;
|
||||
$params['token'] = $apiKey;
|
||||
|
||||
@@ -220,7 +220,7 @@ class ApiController extends BasePageController
|
||||
$maxAge = $api->maxAge();
|
||||
UserRequest::addApiRequest($uid, $request->getRequestUri());
|
||||
|
||||
$imdbId = ($request->input('imdbid') ?? -1);
|
||||
$imdbId = $request->input('imdbid') ?? -1;
|
||||
|
||||
$relData = $releases->moviesSearch(
|
||||
$imdbId,
|
||||
|
||||
@@ -61,7 +61,7 @@ class SearchController extends BasePageController
|
||||
foreach ($releases->getBrowseOrdering() as $orderType) {
|
||||
$this->smarty->assign(
|
||||
'orderby'.$orderType,
|
||||
WWW_TOP.'/search?id='.htmlentities($searchString, ENT_QUOTES | ENT_HTML5).'?t='.implode(',', $categoryID).'&ob='.$orderType
|
||||
WWW_TOP.'/search?id='.htmlentities($searchString, ENT_QUOTES | ENT_HTML5).'&t='.implode(',', $categoryID).'&ob='.$orderType
|
||||
);
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ class SearchController extends BasePageController
|
||||
$categoryID
|
||||
);
|
||||
|
||||
$results = $this->paginate($rslt, $rslt['_totalrows'], config('nntmux.items_per_page'), $page, $request->url(), $request->query());
|
||||
$results = $this->paginate($rslt ?? [], $rslt['_totalrows'] ?? 0, config('nntmux.items_per_page'), $page, $request->url(), $request->query());
|
||||
|
||||
$this->smarty->assign(
|
||||
[
|
||||
|
||||
@@ -563,7 +563,7 @@ jQuery(function($){
|
||||
// search.tpl
|
||||
$('#search_search_button').click(function(){
|
||||
if ($('#search').val())
|
||||
document.location=WWW_TOP + "/search?id=" + $('#search').val() + ($("#search_cat").val()!=-1 ? "?t="+$("#search_cat").val() : "");
|
||||
document.location=WWW_TOP + "/search?id=" + $('#search').val() + ($("#search_cat").val()!=-1 ? "&t="+$("#search_cat").val() : "");
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
@@ -751,7 +751,7 @@ jQuery(function($){
|
||||
// search.tpl
|
||||
$('#search_search_button').click(function(){
|
||||
if ($('#search').val())
|
||||
document.location=WWW_TOP + "/search?id=" + $('#search').val() + ($("#search_cat").val()!=-1 ? "?t="+$("#search_cat").val() : "");
|
||||
document.location=WWW_TOP + "/search?id=" + $('#search').val() + ($("#search_cat").val()!=-1 ? "&t="+$("#search_cat").val() : "");
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
@@ -294,14 +294,14 @@ jQuery(function ($) {
|
||||
});
|
||||
$('#headsearch_go').click(function () {
|
||||
if ($('#headsearch').val() && $('#headsearch').val() != 'Enter keywords') {
|
||||
document.location = WWW_TOP + "/search?id=" + $('#headsearch').val() + ($("#headcat").val() != -1 ? "?t=" + $("#headcat").val() : "");
|
||||
document.location = WWW_TOP + "/search?id=" + $('#headsearch').val() + ($("#headcat").val() != -1 ? "&t=" + $("#headcat").val() : "");
|
||||
}
|
||||
});
|
||||
|
||||
// search.tpl
|
||||
$('#search_search_button').click(function () {
|
||||
if ($('#search').val())
|
||||
document.location = WWW_TOP + "/search?id=" + $('#search').val() + ($("#search_cat").val() != -1 ? "?t=" + $("#search_cat").val() : "");
|
||||
document.location = WWW_TOP + "/search?id=" + $('#search').val() + ($("#search_cat").val() != -1 ? "&t=" + $("#search_cat").val() : "");
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user