Commit 109510f1 authored by Markus Kalkbrenner's avatar Markus Kalkbrenner Committed by Markus Kalkbrenner
Browse files

Issue #3197168 by Taran2L, mkalkbrenner: treat language "zxx" like "und"

parent d428f355
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1215,12 +1215,6 @@ class Utility {

    $settings = self::getIndexSolrSettings($index);
    $language_ids = $query->getLanguages();
    array_walk($language_ids, function(&$item, $key) {
      if (LanguageInterface::LANGCODE_NOT_APPLICABLE === $item) {
        $item = LanguageInterface::LANGCODE_NOT_SPECIFIED;
      }
    });
    $language_ids = array_unique($language_ids);

    // If there are no languages set, we need to set them. As an example, a
    // language might be set by a filter in a search view.
@@ -1239,6 +1233,12 @@ class Utility {
      }
    }

    array_walk($language_ids, function(&$item, $key) {
      if (LanguageInterface::LANGCODE_NOT_APPLICABLE === $item) {
        $item = LanguageInterface::LANGCODE_NOT_SPECIFIED;
      }
    });

    if ($settings['multilingual']['include_language_independent']) {
      $language_ids[] = LanguageInterface::LANGCODE_NOT_SPECIFIED;
      // LanguageInterface::LANGCODE_NOT_APPLICABLE is mapped to