diff --git a/Blacklight/Releases.php b/Blacklight/Releases.php index 784bfbd87..194a64b0d 100755 --- a/Blacklight/Releases.php +++ b/Blacklight/Releases.php @@ -581,8 +581,6 @@ class Releases * @param $groupName * @param $sizeFrom * @param $sizeTo - * @param $hasNfo - * @param $hasComments * @param $daysNew * @param $daysOld * @param int $offset @@ -597,7 +595,7 @@ class Releases * * @return array|\Illuminate\Database\Eloquent\Collection|mixed */ - public function search($searchName, $usenetName, $posterName, $fileName, $groupName, $sizeFrom, $sizeTo, $hasNfo, $hasComments, $daysNew, $daysOld, $offset = 0, $limit = 1000, $orderBy = '', $maxAge = -1, array $excludedCats = [], $type = 'basic', array $cat = [-1], $minSize = 0, array $tags = []) + public function search($searchName, $usenetName, $posterName, $fileName, $groupName, $sizeFrom, $sizeTo, $daysNew, $daysOld, $offset = 0, $limit = 1000, $orderBy = '', $maxAge = -1, array $excludedCats = [], $type = 'basic', array $cat = [-1], $minSize = 0, array $tags = []) { $sizeRange = [ 1 => 1, @@ -645,7 +643,7 @@ class Releases $catQuery = sprintf('AND r.categories_id = %d', $cat[0]); } $whereSql = sprintf( - 'WHERE r.passwordstatus %s AND r.nzbstatus = %d %s %s %s %s %s %s %s %s %s %s %s %s %s', + 'WHERE r.passwordstatus %s AND r.nzbstatus = %d %s %s %s %s %s %s %s %s %s %s %s', $this->showPasswords(), NZB::NZB_ADDED, ! empty($tags) ? " AND tt.tag_name IN ('".implode("','", $tags)."')" : '', @@ -653,8 +651,6 @@ class Releases ((int) $groupName !== -1 ? sprintf(' AND r.groups_id = %d ', Group::getIDByName($groupName)) : ''), (array_key_exists($sizeFrom, $sizeRange) ? ' AND r.size > '.(104857600 * (int) $sizeRange[$sizeFrom]).' ' : ''), (array_key_exists($sizeTo, $sizeRange) ? ' AND r.size < '.(104857600 * (int) $sizeRange[$sizeTo]).' ' : ''), - ((int) $hasNfo !== 0 ? ' AND r.nfostatus = 1 ' : ''), - ((int) $hasComments !== 0 ? ' AND r.comments > 0 ' : ''), $catQuery, ((int) $daysNew !== -1 ? sprintf(' AND r.postdate < (NOW() - INTERVAL %d DAY) ', $daysNew) : ''), ((int) $daysOld !== -1 ? sprintf(' AND r.postdate > (NOW() - INTERVAL %d DAY) ', $daysOld) : ''), diff --git a/Changelog b/Changelog index b7ea9056a..e18091910 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2019-02-04 DariusIII + * Chg: Remove nfo and comments options from search function (searching for releases that are commented or have nfo) * Chg: Remove SphinxSearch rules description as those do not apply anymore (not using raw queries but SphinxQL query builder) * Chg: Update spatie/laravel-permission (2.30.0 => 2.31.0) * Chg: Update sebastian/diff (3.0.1 => 3.0.2) diff --git a/app/Http/Controllers/Api/ApiController.php b/app/Http/Controllers/Api/ApiController.php index 783b4a9d0..3ffe69e82 100644 --- a/app/Http/Controllers/Api/ApiController.php +++ b/app/Http/Controllers/Api/ApiController.php @@ -129,8 +129,6 @@ class ApiController extends BasePageController $groupName, -1, -1, - 0, - 0, -1, -1, $offset, diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php index 2fe00c7df..1af53c4cf 100644 --- a/app/Http/Controllers/SearchController.php +++ b/app/Http/Controllers/SearchController.php @@ -78,8 +78,6 @@ class SearchController extends BasePageController -1, -1, -1, - 0, - 0, -1, -1, $offset, @@ -144,8 +142,6 @@ class SearchController extends BasePageController $searchVars['searchadvgroups'], $searchVars['searchadvsizefrom'], $searchVars['searchadvsizeto'], - $searchVars['searchadvhasnfo'], - $searchVars['searchadvhascomments'], ($searchVars['searchadvdaysnew'] === '' ? -1 : $searchVars['searchadvdaysnew']), ($searchVars['searchadvdaysold'] === '' ? -1 : $searchVars['searchadvdaysold']), $offset, diff --git a/resources/views/themes/Gentele/search.tpl b/resources/views/themes/Gentele/search.tpl index 303b4b678..be08002f0 100755 --- a/resources/views/themes/Gentele/search.tpl +++ b/resources/views/themes/Gentele/search.tpl @@ -99,16 +99,9 @@