Created
May 5, 2014 14:38
-
-
Save pspanja/ea2702bbfcd8ecb94989 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/eZ/Publish/Core/Repository/URLAliasService.php b/eZ/Publish/Core/Repository/URLAliasService.php | |
index 065956e..348a9a5 100644 | |
--- a/eZ/Publish/Core/Repository/URLAliasService.php | |
+++ b/eZ/Publish/Core/Repository/URLAliasService.php | |
@@ -257,8 +257,23 @@ class URLAliasService implements URLAliasServiceInterface | |
*/ | |
protected function selectAliasLanguageCode( SPIURLAlias $spiUrlAlias, $languageCode ) | |
{ | |
- if ( isset( $languageCode ) && !in_array( $languageCode, $spiUrlAlias->languageCodes ) ) | |
+ if ( isset( $languageCode ) ) | |
{ | |
+ if ( !in_array( $languageCode, $spiUrlAlias->languageCodes ) ) | |
+ { | |
+ return false; | |
+ } | |
+ | |
+ if ( $spiUrlAlias->alwaysAvailable || $this->settings["showAllTranslations"] ) | |
+ { | |
+ return $languageCode; | |
+ } | |
+ | |
+ if ( in_array( $languageCode, $this->settings["prioritizedLanguageList"] ) ) | |
+ { | |
+ return $languageCode; | |
+ } | |
+ | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment