From e644c536653f13f914bd14e8c2f306c7bf652a9d Mon Sep 17 00:00:00 2001 From: Christian Weber Date: Tue, 6 May 2008 16:43:06 +0000 Subject: fix text_exists() to also check fallbacklanguage if set --- it_text.class | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/it_text.class b/it_text.class index a8a4ad7..046dc0c 100644 --- a/it_text.class +++ b/it_text.class @@ -124,10 +124,10 @@ function text($label, $language = null) $language = $this->actlanguage; $text = $this->statictext[$label][$language]; - if (!$text && !$this->text_exists($label, $language)) + if (!isset($text)) { $text = $this->statictext[$label][$this->p['fallbacklanguage']]; - if (!$text && !$this->text_exists($label, $this->p['fallbacklanguage'])) + if (!isset($text)) { $text = "1, 'skipfiles'=>"text|auto_prepend")) . ")'>$label"; it::error(array('title'=>"unknown label $label language $language - see /tmp/alertdata/alert.log", 'backtraceskip'=>2, 'blockmail'=>21600)); @@ -173,7 +173,7 @@ function get_language() */ function text_exists($label, $language = null) { - return isset($this->statictext[$label][isset($language) ? $language : $this->actlanguage]); + return isset($this->statictext[$label][isset($language) ? $language : $this->actlanguage]) || $this->p['fallbacklanguage'] && isset($this->statictext[$label][$this->p['fallbacklanguage']]); } -- cgit v1.2.3