mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 02:01:33 +00:00
Apply fixes from StyleCI
[ci skip] [skip ci]
This commit is contained in:
@@ -7,10 +7,10 @@ use Blacklight\db\DB;
|
||||
use App\Models\Release;
|
||||
use App\Models\Category;
|
||||
use App\Models\Settings;
|
||||
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Blacklight\utility\Utility;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
|
||||
|
||||
/**
|
||||
* Class Releases.
|
||||
@@ -161,8 +161,10 @@ class Releases
|
||||
$sql = $qry->paginate(config('nntmux.items_per_page'));
|
||||
$expiresAt = Carbon::now()->addSeconds(config('nntmux.cache_expiry_medium'));
|
||||
Cache::put(md5(implode('.', $cat).implode('.', $orderBy).$maxAge.implode('.', $excludedCats).$minSize), $sql, $expiresAt);
|
||||
|
||||
return $sql;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $query
|
||||
* @param bool $builder
|
||||
@@ -179,22 +181,26 @@ class Releases
|
||||
if ($builder === false) {
|
||||
return '='.self::PASSWD_NONE;
|
||||
}
|
||||
|
||||
return $query->where('releases.passwordstatus', self::PASSWD_NONE);
|
||||
case 1: // Show releases with no password or a potential password (Show unprocessed releases).
|
||||
if ($builder === false) {
|
||||
return '<= '.self::PASSWD_POTENTIAL;
|
||||
}
|
||||
|
||||
return $query->where('releases.passwordstatus', '=<', self::PASSWD_POTENTIAL);
|
||||
case 2: // Hide releases with a password or a potential password (Show unprocessed releases).
|
||||
if ($builder === false) {
|
||||
return '<= '.self::PASSWD_NONE;
|
||||
}
|
||||
|
||||
return $query->where('releases.passwordstatus', '=<', self::PASSWD_NONE);
|
||||
case 10: // Shows everything.
|
||||
default:
|
||||
if ($builder === false) {
|
||||
return '<= '.self::PASSWD_RAR;
|
||||
}
|
||||
|
||||
return $query->where('releases.passwordstatus', '=<', self::PASSWD_RAR);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,6 @@ class BrowseController extends BasePageController
|
||||
|
||||
$results = $releases->getBrowseRange($catarray, $orderby, -1, $this->userdata['categoryexclusions'], $grp);
|
||||
|
||||
|
||||
$covgroup = '';
|
||||
$this->smarty->assign('catname', $id);
|
||||
|
||||
@@ -82,7 +81,7 @@ class BrowseController extends BasePageController
|
||||
|
||||
$this->smarty->assign('results', $results);
|
||||
|
||||
$this->meta_title = 'Browse Movies > ' . $id;
|
||||
$this->meta_title = 'Browse Movies > '.$id;
|
||||
$this->meta_keywords = 'browse,nzb,description,details';
|
||||
$this->meta_description = 'Browse for Nzbs';
|
||||
|
||||
|
||||
@@ -246,10 +246,10 @@ class Category extends Model
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return $catsrch;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns a concatenated list of other categories.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user