From fe28528da95ec566858f2c32eea743955fce383f Mon Sep 17 00:00:00 2001 From: DariusIII Date: Wed, 14 Feb 2018 09:32:03 +0100 Subject: [PATCH] Fix moviesSearch $whereSql query --- Changelog | 2 ++ composer.lock | 11 ++++++----- nntmux/Releases.php | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Changelog b/Changelog index 11fe4caa8..f196a901f 100755 --- a/Changelog +++ b/Changelog @@ -1,3 +1,5 @@ +2018-02-14 DariusIII + * Fix: Fix moviesSearch $whereSql query 2018-02-13 DariusIII * Chg: Rename search functions to be more descriptive (ie. searchByImdbId searches for movies even without imdbid, so renamed to moviesSearch) * Chg: Use insertGetId again in addGroup function diff --git a/composer.lock b/composer.lock index 9e3b1795f..b1cbc8933 100644 --- a/composer.lock +++ b/composer.lock @@ -4579,12 +4579,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "f70d3cc8728777f688ff9a50e5a0efb7b18e2e94" + "reference": "5ebdd35b291cf9be4a425022872cb3aaf03192df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/f70d3cc8728777f688ff9a50e5a0efb7b18e2e94", - "reference": "f70d3cc8728777f688ff9a50e5a0efb7b18e2e94", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/5ebdd35b291cf9be4a425022872cb3aaf03192df", + "reference": "5ebdd35b291cf9be4a425022872cb3aaf03192df", "shasum": "" }, "conflict": { @@ -4634,6 +4634,7 @@ "onelogin/php-saml": "<2.10.4", "oro/crm": ">=1.7,<1.7.4", "oro/platform": ">=1.7,<1.7.4", + "padraic/file_get_contents": "<1.1.2", "phpmailer/phpmailer": ">=5,<5.2.24", "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3", "phpxmlrpc/extras": "<0.6.1", @@ -4668,7 +4669,7 @@ "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7", "thelia/backoffice-default-template": ">=2.1,<2.1.2", - "thelia/thelia": ">=2.1.0-beta1,<2.1.3|>=2.1,<2.1.2", + "thelia/thelia": ">=2.1,<2.1.2|>=2.1.0-beta1,<2.1.3", "twig/twig": "<1.20", "typo3/cms": ">=6.2,<6.2.30|>=7,<7.6.22|>=8,<8.7.5", "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.10|>=3.1,<3.1.7|>=3.2,<3.2.7|>=3.3,<3.3.5", @@ -4717,7 +4718,7 @@ } ], "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", - "time": "2018-02-13T07:41:18+00:00" + "time": "2018-02-13T10:17:11+00:00" }, { "name": "rtheunissen/guzzle-log-middleware", diff --git a/nntmux/Releases.php b/nntmux/Releases.php index 738cc56ab..9b172a6d4 100755 --- a/nntmux/Releases.php +++ b/nntmux/Releases.php @@ -994,11 +994,11 @@ class Releases public function moviesSearch($imDbId, $offset = 0, $limit = 100, $name = '', array $cat = [-1], $maxAge = -1, $minSize = 0): array { $whereSql = sprintf( - '%s + "%s WHERE r.categories_id BETWEEN " . Category::MOVIE_ROOT . " AND " . Category::MOVIE_OTHER . " AND r.nzbstatus = %d AND r.passwordstatus %s - %s %s %s %s %s', + %s %s %s %s %s", ($name !== '' ? $this->releaseSearch->getFullTextJoinString() : ''), NZB::NZB_ADDED, $this->showPasswords,