mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Fix issues reported by scrutinizer (strings where arrays are expected and vice versa)
This commit is contained in:
@@ -2470,7 +2470,7 @@ class NameFixer
|
||||
$this->_cleanMatchFiles();
|
||||
$this->cleanFileNames();
|
||||
if (! empty($this->_fileName)) {
|
||||
foreach ($this->sphinx->searchIndexes('predb_rt', $this->_fileName, 'title') as $match) {
|
||||
foreach ($this->sphinx->searchIndexes('predb_rt', $this->_fileName, ['title']) as $match) {
|
||||
if (! empty($match)) {
|
||||
$this->updateRelease($release, $match['title'], 'PreDb: Title match', $echo, $type, $nameStatus, $show, $match['id']);
|
||||
|
||||
|
||||
@@ -635,7 +635,7 @@ class Releases
|
||||
|
||||
|
||||
|
||||
$results = $this->sphinxSearch->searchIndexes('releases_rt', '', '', $searchFields);
|
||||
$results = $this->sphinxSearch->searchIndexes('releases_rt', '', [], $searchFields);
|
||||
|
||||
$searchResult = array_pluck($results, 'id');
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
2019-01-21 DariusIII
|
||||
* Fix: Fix issues reported by scrutinizer (strings where arrays are expected and vice versa)
|
||||
* Chg: Update search, update matching
|
||||
2019-01-20 DariusIII
|
||||
* Chg: Update rest of the cover checking files
|
||||
|
||||
@@ -173,17 +173,17 @@ class Predb extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $search
|
||||
* @param string $search
|
||||
*
|
||||
* @return mixed
|
||||
* @throws \Exception
|
||||
*/
|
||||
public static function getAll($search = [])
|
||||
public static function getAll($search = '')
|
||||
{
|
||||
$sql = self::query()->remember(config('nntmux.cache_expiry_medium'))->leftJoin('releases', 'releases.predb_id', '=', 'predb.id')->orderByDesc('predb.predate');
|
||||
if (! empty($search)) {
|
||||
$sphinx = new SphinxSearch();
|
||||
$ids = array_pluck($sphinx->searchIndexes('predb_rt', $search, 'title'), 'id');
|
||||
$ids = array_pluck($sphinx->searchIndexes('predb_rt', $search, ['title']), 'id');
|
||||
$sql->whereIn('predb.id', $ids);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user