diff options
-rw-r--r-- | it_text.class | 6 |
1 files 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 = "<span style='background:#F88' title='$label (" . it_debug::backtrace(array('levels'=>1, 'skipfiles'=>"text|auto_prepend")) . ")'>$label</span'>"; 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']]); } |