Created
September 4, 2015 16:10
-
-
Save tomasnorre/28c3834199425ee3286b 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
Index: classes/class.tx_languagevisibility_visibilityService.php | |
=================================================================== | |
--- classes/class.tx_languagevisibility_visibilityService.php (revision 70289) | |
+++ classes/class.tx_languagevisibility_visibilityService.php (working copy) | |
@@ -130,6 +130,8 @@ | |
public function isVisible(tx_languagevisibility_language $language, tx_languagevisibility_element $element, $omitLocal = false) { | |
$this->_relevantOverlayLanguageId = $language->getUid(); | |
+ $languageRep = t3lib_div::makeInstance('tx_languagevisibility_languagerepository'); | |
+ | |
$visibility = $this->getVisibilitySetting($language, $element, $omitLocal); | |
if ($visibility == 'yes') { | |
if (!$element->hasTranslation($language->getUid())) { | |
@@ -159,7 +161,8 @@ | |
} | |
foreach ($fallBackOrder as $languageid) { | |
- if ($element->hasTranslation($languageid)) { | |
+ $fallbackLanguage = $languageRep->getLanguageById($languageid); | |
+ if ($element->hasTranslation($languageid) && $this->isVisible($fallbackLanguage, $element, $omitLocal)) { | |
$this->_relevantOverlayLanguageId = $languageid; | |
$result = true; | |
break; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment