diff --git a/Changelog b/Changelog index 419c79848..c3b9330d3 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2018-02-14 DariusIII + * Chg: Update API and RSS classes * Chg: Remove unused Settings use statement from api page * Fix: Fix moviesSearch $whereSql query 2018-02-13 DariusIII diff --git a/nntmux/http/API.php b/nntmux/http/API.php index d731062a2..520fd689a 100755 --- a/nntmux/http/API.php +++ b/nntmux/http/API.php @@ -56,7 +56,7 @@ class API extends Capabilities * Add language from media info XML to release search names (Used by API). * @param array $releases */ - public function addLanguage(&$releases) + public function addLanguage(&$releases): void { if ($releases && \count($releases)) { foreach ($releases as $key => $release) { @@ -162,7 +162,7 @@ class API extends Capabilities * Check if a parameter is empty. * @param string $parameter */ - public function verifyEmptyParameter($parameter) + public function verifyEmptyParameter($parameter): void { if (isset($this->getRequest[$parameter]) && $this->getRequest[$parameter] === '') { Utility::showApiError(201, 'Incorrect parameter ('.$parameter.' must not be empty)'); @@ -173,7 +173,7 @@ class API extends Capabilities * @param $releases * @param callable $getCoverURL */ - public function addCoverURL(&$releases, callable $getCoverURL) + public function addCoverURL(&$releases, callable $getCoverURL): void { if ($releases && \count($releases)) { foreach ($releases as $key => $release) { diff --git a/nntmux/http/RSS.php b/nntmux/http/RSS.php index bc128eee5..014229c9c 100755 --- a/nntmux/http/RSS.php +++ b/nntmux/http/RSS.php @@ -51,7 +51,7 @@ class RSS extends Capabilities $catLimit = 'AND r.categories_id BETWEEN '.Category::TV_ROOT.' AND '.Category::TV_OTHER; - if (count($cat)) { + if (\count($cat)) { if ((int) $cat[0] === -2) { $cartSearch = sprintf( 'INNER JOIN users_releases ON users_releases.users_id = %d AND users_releases.releases_id = r.id', @@ -153,7 +153,7 @@ class RSS extends Capabilities ), 'videos_id' ), - (count($excludedCats) ? 'AND r.categories_id NOT IN ('.implode(',', $excludedCats).')' : ''), + (\count($excludedCats) ? 'AND r.categories_id NOT IN ('.implode(',', $excludedCats).')' : ''), ($airDate > -1 ? sprintf('AND tve.firstaired >= DATE_SUB(CURDATE(), INTERVAL %d DAY) ', $airDate) : ''), NZB::NZB_ADDED, Category::TV_ROOT, @@ -208,7 +208,7 @@ class RSS extends Capabilities ), 'imdbid' ), - (count($excludedCats) ? ' AND r.categories_id NOT IN ('.implode(',', $excludedCats).')' : ''), + (\count($excludedCats) ? ' AND r.categories_id NOT IN ('.implode(',', $excludedCats).')' : ''), NZB::NZB_ADDED, Category::MOVIE_ROOT, Category::MOVIE_OTHER,