diff --git a/Blacklight/Movie.php b/Blacklight/Movie.php index 2009aec27..13c4a0818 100755 --- a/Blacklight/Movie.php +++ b/Blacklight/Movie.php @@ -264,7 +264,7 @@ class Movie if ($movieCache !== null) { $movies = $movieCache; } else { - $data = MovieInfo::fromRaw($moviesSql); + $data = MovieInfo::fromQuery($moviesSql); $movies = ['total' => DB::select('SELECT FOUND_ROWS() AS total'), 'result' => $data]; Cache::put(md5($moviesSql.$page), $movies, $expiresAt); } @@ -318,7 +318,7 @@ class Movie if ($return !== null) { return $return; } - $return = Release::fromRaw($sql); + $return = Release::fromQuery($sql); if (\count($return) > 0) { $return[0]->_totalcount = $movies['total'][0]->total ?? 0; } @@ -541,7 +541,7 @@ class Movie $query[$key] = rtrim($value, ', '); } - MovieInfo::fromRaw($query[0].') '.$query[1].') '.$query[2]); + MovieInfo::fromQuery($query[0].') '.$query[1].') '.$query[2]); return true; } diff --git a/Blacklight/http/RSS.php b/Blacklight/http/RSS.php index afff23c81..82ac1e9db 100755 --- a/Blacklight/http/RSS.php +++ b/Blacklight/http/RSS.php @@ -112,7 +112,7 @@ class RSS extends Capabilities return $result; } - $result = Release::fromRaw($sql); + $result = Release::fromQuery($sql); Cache::put(md5($sql), $result, $expiresAt); return $result; @@ -146,7 +146,7 @@ class RSS extends Capabilities AND r.passwordstatus %s ORDER BY postdate DESC %s", $this->releases->uSQL( - UserSerie::fromRaw( + UserSerie::fromQuery( sprintf( ' SELECT videos_id, categories @@ -172,7 +172,7 @@ class RSS extends Capabilities return $result; } - $result = Release::fromRaw($sql); + $result = Release::fromQuery($sql); Cache::put(md5($sql), $result, $expiresAt); return $result; @@ -207,7 +207,7 @@ class RSS extends Capabilities AND r.passwordstatus %s ORDER BY postdate DESC %s", $this->releases->uSQL( - UserMovie::fromRaw( + UserMovie::fromQuery( sprintf( ' SELECT imdbid, categories @@ -232,7 +232,7 @@ class RSS extends Capabilities return $result; } - $result = Release::fromRaw($sql); + $result = Release::fromQuery($sql); Cache::put(md5($sql), $result, $expiresAt); diff --git a/Blacklight/processing/post/ProcessAdditional.php b/Blacklight/processing/post/ProcessAdditional.php index 5155747c6..8d95aadf9 100755 --- a/Blacklight/processing/post/ProcessAdditional.php +++ b/Blacklight/processing/post/ProcessAdditional.php @@ -1632,7 +1632,7 @@ class ProcessAdditional ); } - Release::fromRaw($query); + Release::fromQuery($query); } /** diff --git a/misc/elasticsearch/populate_es_indexes.php b/misc/elasticsearch/populate_es_indexes.php index f708657fd..f8a146539 100644 --- a/misc/elasticsearch/populate_es_indexes.php +++ b/misc/elasticsearch/populate_es_indexes.php @@ -30,7 +30,7 @@ function populate_indexes($table, $max) ORDER BY r.id ASC LIMIT %d'; - $totals = Release::fromRaw('SELECT COUNT(id) AS c, MIN(id) AS min FROM releases')->first(); + $totals = Release::fromQuery('SELECT COUNT(id) AS c, MIN(id) AS min FROM releases')->first(); if (! $totals) { exit("Could not get database information for releases table.\n"); } @@ -47,7 +47,7 @@ function populate_indexes($table, $max) ORDER BY id ASC LIMIT %d'; - $totals = Predb::fromRaw('SELECT COUNT(id) AS c, MIN(id) AS min FROM predb')->first(); + $totals = Predb::fromQuery('SELECT COUNT(id) AS c, MIN(id) AS min FROM predb')->first(); if (! $totals) { exit("Could not get database information for predb table.\n"); } diff --git a/misc/manticoresearch/populate_rt_indexes.php b/misc/manticoresearch/populate_rt_indexes.php index 4805892f6..8d3a87f08 100644 --- a/misc/manticoresearch/populate_rt_indexes.php +++ b/misc/manticoresearch/populate_rt_indexes.php @@ -38,7 +38,7 @@ function populate_rt($table, $max) ORDER BY r.id ASC LIMIT %d'; - $totals = Release::fromRaw('SELECT COUNT(id) AS c, MIN(id) AS min FROM releases')->first(); + $totals = Release::fromQuery('SELECT COUNT(id) AS c, MIN(id) AS min FROM releases')->first(); if (! $totals) { exit("Could not get database information for releases table.\n"); } @@ -55,7 +55,7 @@ function populate_rt($table, $max) ORDER BY id ASC LIMIT %d'; - $totals = Predb::fromRaw('SELECT COUNT(id) AS c, MIN(id) AS min FROM predb')->first(); + $totals = Predb::fromQuery('SELECT COUNT(id) AS c, MIN(id) AS min FROM predb')->first(); if (! $totals) { exit("Could not get database information for predb table.\n"); } diff --git a/misc/update/tmux/bin/groupfixrelnames.php b/misc/update/tmux/bin/groupfixrelnames.php index 4d08122a9..b3be586a8 100644 --- a/misc/update/tmux/bin/groupfixrelnames.php +++ b/misc/update/tmux/bin/groupfixrelnames.php @@ -32,7 +32,7 @@ switch (true) { // Find releases to process. We only want releases that have no PreDB match, have not been renamed, exist // in Other Categories, have already been PP Add/NFO processed, and haven't been fully fixRelName processed - $releases = Release::fromRaw(sprintf(" + $releases = Release::fromQuery(sprintf(" SELECT r.id AS releases_id, r.fromname, r.guid, r.groups_id, r.categories_id, r.name, r.searchname, r.proc_nfo, r.proc_uid, r.proc_files, r.proc_par2, r.ishashed, r.dehashstatus, r.nfostatus, @@ -219,7 +219,7 @@ switch (true) { break; case $type === 'predbft' && isset($maxPerRun) && is_numeric($maxPerRun) && isset($thread) && is_numeric($thread): - $pres = Predb::fromRaw( + $pres = Predb::fromQuery( sprintf( ' SELECT p.id AS predb_id, p.title, p.source, p.searched