From: Vincent Vanwaelscappel Date: Wed, 15 Jan 2020 17:00:01 +0000 (+0100) Subject: wip #3323 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=d044a841023f3be808032fb241946ad70f2cb103;p=cubist_cms-back.git wip #3323 @0.5 --- 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); } - }