summaryrefslogtreecommitdiff
path: root/it_text.class
diff options
context:
space:
mode:
authorChristian Weber2008-05-06 16:43:06 +0000
committerChristian Weber2008-05-06 16:43:06 +0000
commite644c536653f13f914bd14e8c2f306c7bf652a9d (patch)
tree782095d87acde54de2e9cc0ba712aeca220e14af /it_text.class
parent0df388c5566e315d5701aabc4e45e32f50a6ffdb (diff)
downloaditools-e644c536653f13f914bd14e8c2f306c7bf652a9d.tar.gz
itools-e644c536653f13f914bd14e8c2f306c7bf652a9d.tar.bz2
itools-e644c536653f13f914bd14e8c2f306c7bf652a9d.zip
fix text_exists() to also check fallbacklanguage if set
Diffstat (limited to 'it_text.class')
-rw-r--r--it_text.class6
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']]);
}