Skip to content

Instantly share code, notes, and snippets.

@tomasnorre
Created September 4, 2015 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomasnorre/28c3834199425ee3286b to your computer and use it in GitHub Desktop.
Save tomasnorre/28c3834199425ee3286b to your computer and use it in GitHub Desktop.
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