From d044a841023f3be808032fb241946ad70f2cb103 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 15 Jan 2020 18:00:01 +0100 Subject: [PATCH] wip #3323 @0.5 --- src/app/Magic/Models/Locale.php | 8 ++++---- src/app/Magic/Search.php | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/app/Magic/Models/Locale.php b/src/app/Magic/Models/Locale.php index a28c8a4..09de439 100644 --- a/src/app/Magic/Models/Locale.php +++ b/src/app/Magic/Models/Locale.php @@ -96,9 +96,9 @@ class Locale extends CubistMagicAbstractModel /** * @return Locale[] */ - public static function getLocales($filterVariant = true) + public static function getLocales($variant = null) { - return self::getLocalesData($filterVariant)['locales']; + return self::getLocalesData($variant)['locales']; } public static function getLocalesCodes() @@ -118,9 +118,9 @@ class Locale extends CubistMagicAbstractModel /** * @return string */ - public static function getDefaultLocale($filterVariant = true) + public static function getDefaultLocale($variant = null) { - return self::getLocalesData($filterVariant)['default']; + return self::getLocalesData($variant)['default']; } public static function getLocaleClass() diff --git a/src/app/Magic/Search.php b/src/app/Magic/Search.php index 2a2f06f..63da782 100644 --- a/src/app/Magic/Search.php +++ b/src/app/Magic/Search.php @@ -148,7 +148,7 @@ class Search self::indexLocale($variant, $locale); return; } - foreach (Locale::getLocales() as $l) { + foreach (Locale::getLocales($variant) as $l) { self::indexLocale($variant, $l->locale); } } @@ -227,7 +227,6 @@ class Search $indexed[$url] = true; Elasticsearch::index($data); } - } -- 2.39.5