From d7556bfe4d1e4d2eef8f3ae454bc0ccd07aee3e9 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Tue, 13 Feb 2018 15:17:14 +0100 Subject: [PATCH] Rename search functions to be more descriptive (ie. searchByImdbId searches for movies even without imdbid, so renamed to moviesSearch) --- Changelog | 1 + nntmux/Releases.php | 6 +++--- public/pages/anime.php | 2 +- public/pages/api.php | 4 ++-- public/pages/series.php | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Changelog b/Changelog index ea73f11cd..11fe4caa8 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 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 * Chg: Update phpunit to version 7.0.1 2018-02-12 DariusIII diff --git a/nntmux/Releases.php b/nntmux/Releases.php index 3ea38a043..738cc56ab 100755 --- a/nntmux/Releases.php +++ b/nntmux/Releases.php @@ -776,7 +776,7 @@ class Releases * * @return array */ - public function searchShows( + public function tvSearch( array $siteIdArr = [], $series = '', $episode = '', @@ -922,7 +922,7 @@ class Releases * * @return array */ - public function searchbyAnidbId($aniDbID, $offset = 0, $limit = 100, $name = '', array $cat = [-1], $maxAge = -1): array + public function animeSearch($aniDbID, $offset = 0, $limit = 100, $name = '', array $cat = [-1], $maxAge = -1): array { $whereSql = sprintf( '%s @@ -991,7 +991,7 @@ class Releases * * @return array */ - public function searchbyImdbId($imDbId, $offset = 0, $limit = 100, $name = '', array $cat = [-1], $maxAge = -1, $minSize = 0): array + public function moviesSearch($imDbId, $offset = 0, $limit = 100, $name = '', array $cat = [-1], $maxAge = -1, $minSize = 0): array { $whereSql = sprintf( '%s diff --git a/public/pages/anime.php b/public/pages/anime.php index 6d810a9b7..69b819e13 100755 --- a/public/pages/anime.php +++ b/public/pages/anime.php @@ -15,7 +15,7 @@ $aniDB = new AniDB(['Settings' => $page->settings]); if (isset($_GET['id']) && ctype_digit($_GET['id'])) { // force the category to TV_ANIME as it should be for anime, as $catarray was NULL and we know the category for sure for anime - $aniDbReleases = $releases->searchbyAnidbId($_GET['id'], 0, 1000, '', [Category::TV_ANIME], -1); + $aniDbReleases = $releases->animeSearch($_GET['id'], 0, 1000, '', [Category::TV_ANIME], -1); $aniDbInfo = $aniDB->getAnimeInfo($_GET['id']); if (! $releases && ! $aniDbInfo) { diff --git a/public/pages/api.php b/public/pages/api.php index 981b72bc1..e1808fc98 100644 --- a/public/pages/api.php +++ b/public/pages/api.php @@ -179,7 +179,7 @@ switch ($function) { $airdate = str_replace('/', '-', $year[0].'-'.$episode); } - $relData = $releases->searchShows( + $relData = $releases->tvSearch( $siteIdArr, $series, $episode, @@ -205,7 +205,7 @@ switch ($function) { $imdbId = ($_GET['imdbid'] ?? -1); - $relData = $releases->searchbyImdbId( + $relData = $releases->moviesSearch( $imdbId, $offset, $api->limit(), diff --git a/public/pages/series.php b/public/pages/series.php index 5826a41ec..730134de0 100644 --- a/public/pages/series.php +++ b/public/pages/series.php @@ -20,7 +20,7 @@ if (isset($_GET['id']) && ctype_digit($_GET['id'])) { $catarray = []; $catarray[] = $category; - $rel = $releases->searchShows(['id' => $_GET['id']], '', '', '', 0, 1000, '', $catarray, -1); + $rel = $releases->tvSearch(['id' => $_GET['id']], '', '', '', 0, 1000, '', $catarray, -1); $show = Video::getByVideoID($_GET['id']); if (! $show) {