From 8b4a3b5a1600fb37507215a3232ce8a5fef14312 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Fri, 13 Apr 2018 09:53:09 +0200 Subject: [PATCH] Fix search --- Blacklight/ReleaseSearch.php | 2 +- Blacklight/Releases.php | 4 ++-- Changelog | 2 ++ app/Http/Controllers/SearchController.php | 5 ----- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Blacklight/ReleaseSearch.php b/Blacklight/ReleaseSearch.php index 3df92b5e3..0505f7956 100755 --- a/Blacklight/ReleaseSearch.php +++ b/Blacklight/ReleaseSearch.php @@ -134,7 +134,7 @@ class ReleaseSearch } if ($searchQuery !== '') { if ($builder === true) { - return $query->whereRaw("(rse.query = '@@relaxed ?')", [trim($searchQuery).$this->sphinxQueryOpt]); + return $query->whereRaw(sprintf("(rse.query = '@@relaxed %s')", trim($searchQuery).$this->sphinxQueryOpt)); } $fullReturn = sprintf("AND (rse.query = '@@relaxed %s')", trim($searchQuery).$this->sphinxQueryOpt); diff --git a/Blacklight/Releases.php b/Blacklight/Releases.php index b0abfc956..3bd35fecc 100755 --- a/Blacklight/Releases.php +++ b/Blacklight/Releases.php @@ -626,8 +626,8 @@ class Releases if ($orderBy === '') { $orderBy = []; - $orderBy[0] = 'postdate '; - $orderBy[1] = 'desc '; + $orderBy[0] = 'postdate'; + $orderBy[1] = 'desc'; } else { $orderBy = $this->getBrowseOrder($orderBy); } diff --git a/Changelog b/Changelog index 39681658a..7d38bb952 100755 --- a/Changelog +++ b/Changelog @@ -1,3 +1,5 @@ +2018-04-13 DariusIII + * Fix: Fix search 2018-04-12 DariusIII * Fix: Fix a bug in group model getGroupsForSelect function * Chg: Update search diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index b4b950189..987122640 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -17,7 +17,6 @@ class SearchController extends BasePageController public function search(Request $request) { $this->setPrefs(); - dump($request->all()); $releases = new Releases(['Groups' => null, 'Settings' => $this->settings]); $meta_title = 'Search Nzbs'; @@ -83,8 +82,6 @@ class SearchController extends BasePageController $categoryID ); - dump($results->total()); - $this->smarty->assign( [ 'lastvisit' => $this->userdata['lastlogin'], @@ -145,8 +142,6 @@ class SearchController extends BasePageController [$searchVars['searchadvcat'] === '' ? -1 : $searchVars['searchadvcat']] ); - dump($results->total()); - $this->smarty->assign( [ 'lastvisit' => $this->userdata['lastlogin'],