mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 17:01:16 +00:00
Fix missed renames for root_categories table
This commit is contained in:
@@ -263,7 +263,7 @@ class Releases extends Release
|
||||
->select(['r.searchname', 'r.guid', 'g.name as gname', DB::raw("CONCAT(cp.title,'_',c.title) AS catName")])
|
||||
->from('releases as r')
|
||||
->leftJoin('categories as c', 'c.id', '=', 'r.categories_id')
|
||||
->leftJoin('categories as cp', 'cp.id', '=', 'c.root_categories_id')
|
||||
->leftJoin('root_categories as cp', 'cp.id', '=', 'c.root_categories_id')
|
||||
->leftJoin('usenet_groups as g', 'g.id', '=', 'r.groups_id');
|
||||
|
||||
if ($groupID !== '') {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
2019-03-15 DariusIII
|
||||
* Fix: Fix missed renames for root_categories table
|
||||
* Chg: Update phpstan/phpstan (0.11.3 => 0.11.4)
|
||||
2019-03-14 DariusIII
|
||||
* Chg: Use function to delete releases with bad or missing nzbs
|
||||
|
||||
@@ -107,7 +107,7 @@ class CategoryRegexesController extends BasePageController
|
||||
$categories_db = Category::query()
|
||||
->select(['c.id', 'c.title', 'cp.title as parent_title'])
|
||||
->from('categories as c')
|
||||
->join('categories as cp', 'c.root_categories_id', '=', 'cp.id')
|
||||
->join('root_categories as cp', 'c.root_categories_id', '=', 'cp.id')
|
||||
->whereNotNull('c.root_categories_id')
|
||||
->orderBy('c.id')
|
||||
->get();
|
||||
|
||||
@@ -453,7 +453,7 @@ class Release extends Model
|
||||
]
|
||||
)
|
||||
->leftJoin('categories as c', 'c.id', '=', 'releases.categories_id')
|
||||
->leftJoin('categories as cp', 'cp.id', '=', 'c.root_categories_id')
|
||||
->leftJoin('root_categories as cp', 'cp.id', '=', 'c.root_categories_id')
|
||||
->orderByDesc('releases.postdate')
|
||||
->paginate(config('nntmux.items_per_page'));
|
||||
}
|
||||
@@ -499,7 +499,7 @@ class Release extends Model
|
||||
)
|
||||
->leftJoin('usenet_groups as g', 'g.id', '=', 'releases.groups_id')
|
||||
->leftJoin('categories as c', 'c.id', '=', 'releases.categories_id')
|
||||
->leftJoin('categories as cp', 'cp.id', '=', 'c.root_categories_id')
|
||||
->leftJoin('root_categories as cp', 'cp.id', '=', 'c.root_categories_id')
|
||||
->leftJoin('videos as v', 'v.id', '=', 'releases.videos_id')
|
||||
->leftJoin('tv_info as tvi', 'tvi.videos_id', '=', 'releases.videos_id')
|
||||
->leftJoin('tv_episodes as tve', 'tve.id', '=', 'releases.tv_episodes_id')
|
||||
@@ -532,7 +532,7 @@ class Release extends Model
|
||||
->select(['name', 'searchname', 'size', 'guid', 'totalpart', 'postdate', 'adddate', 'grabs', 'cp.title as parent_category', 'c.title as sub_category', DB::raw("CONCAT(cp.title, ' > ', c.title) AS category_name")])
|
||||
->rightJoin('dnzb_failures', 'dnzb_failures.release_id', '=', 'releases.id')
|
||||
->leftJoin('categories as c', 'c.id', '=', 'releases.categories_id')
|
||||
->leftJoin('categories as cp', 'cp.id', '=', 'c.root_categories_id')
|
||||
->leftJoin('root_categories as cp', 'cp.id', '=', 'c.root_categories_id')
|
||||
->orderBy('postdate', 'desc');
|
||||
|
||||
return $failedList->paginate(config('nntmux.items_per_page'));
|
||||
|
||||
Reference in New Issue
Block a user