mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 06:46:08 -06:00
fixed search for active language
This commit is contained in:
parent
fc5da6d301
commit
69b4a83c24
@ -66,6 +66,7 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
|||||||
{
|
{
|
||||||
$isActiveDopings = new AdvModel();
|
$isActiveDopings = new AdvModel();
|
||||||
$isActiveDopings = $isActiveDopings->is_enabled('dopings');
|
$isActiveDopings = $isActiveDopings->is_enabled('dopings');
|
||||||
|
$defaultLocale = setting_value('streams::default_locale');
|
||||||
|
|
||||||
$query = $this->model;
|
$query = $this->model;
|
||||||
$query = $query->where('advs_advs.slug', '!=', "");
|
$query = $query->where('advs_advs.slug', '!=', "");
|
||||||
@ -75,7 +76,7 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
|
|||||||
|
|
||||||
$query = $query->leftJoin('advs_advs_translations', function ($join) {
|
$query = $query->leftJoin('advs_advs_translations', function ($join) {
|
||||||
$join->on('advs_advs.id', '=', 'advs_advs_translations.entry_id');
|
$join->on('advs_advs.id', '=', 'advs_advs_translations.entry_id');
|
||||||
$join->where('advs_advs_translations.locale', '=', Request()->session()->get('_locale'));
|
$join->where('advs_advs_translations.locale', '=', Request()->session()->get('_locale',$defaultLocale));
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!empty($param['keyword'])) {
|
if (!empty($param['keyword'])) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user