mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-28 00:24:41 -06:00
#4237 The main category does not appear if the subcategory is not attached.
This commit is contained in:
parent
668f01bab2
commit
f987be6bc2
@ -61,9 +61,11 @@ class CategoryRepository extends EntryRepository implements CategoryRepositoryIn
|
||||
)
|
||||
->leftJoin((DB::raw($dBName . ' c2')), DB::raw('c2.parent_category_id'), '=', DB::raw('c1.id'))
|
||||
->leftJoin((DB::raw($dBNamet . ' t1')), DB::raw('c1.id'), '=', DB::raw('t1.entry_id'))
|
||||
->leftJoin((DB::raw($dBNamet . ' t2')), DB::raw('c2.id'), '=', DB::raw('t2.entry_id'))
|
||||
->leftJoin((DB::raw($dBNamet . ' t2')), function ($join) {
|
||||
$join->on(DB::raw('c2.id'), '=', DB::raw('t2.entry_id'))
|
||||
->where(DB::raw('t2.locale'), Request()->session()->get('_locale', setting_value('streams::default_locale')));
|
||||
})
|
||||
->where(DB::raw('t1.locale'), Request()->session()->get('_locale', setting_value('streams::default_locale')))
|
||||
->where(DB::raw('t2.locale'), Request()->session()->get('_locale', setting_value('streams::default_locale')))
|
||||
->where(DB::raw("c1.deleted_at"), NULL)
|
||||
->where(DB::raw("c2.deleted_at"), NULL)
|
||||
->whereNull(DB::raw("c1.parent_category_id"))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user