summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2019-02-05 15:07:31 +0100
committerUrban Müller2019-02-05 15:07:31 +0100
commitaafd95fc673f850503fdbe342ce17cdbd24d5c49 (patch)
tree94417a3638372dd5f9012bd661ec39ede269f7d0
parent641b473a08af61ee57cc56724cf794158a116471 (diff)
downloaditools-aafd95fc673f850503fdbe342ce17cdbd24d5c49.tar.gz
itools-aafd95fc673f850503fdbe342ce17cdbd24d5c49.tar.bz2
itools-aafd95fc673f850503fdbe342ce17cdbd24d5c49.zip
return $label instead of true if label exists
-rw-r--r--auto_prepend.php2
-rw-r--r--it_text.class2
2 files changed, 2 insertions, 2 deletions
diff --git a/auto_prepend.php b/auto_prepend.php
index 4115f83..0aa70ef 100644
--- a/auto_prepend.php
+++ b/auto_prepend.php
@@ -142,7 +142,7 @@ function T_languages()
/**
* Check if a text entry for a specific label exists
* @param $label Label to check
- * @return true if text exists in actual (or supplied) language, false otherwise.
+ * @return label name if text exists in current (or supplied) language, false otherwise.
*/
function T_exists($label, $language = null)
{
diff --git a/it_text.class b/it_text.class
index f3c9fe0..42753a8 100644
--- a/it_text.class
+++ b/it_text.class
@@ -208,7 +208,7 @@ function get_defaultlanguage()
*/
function text_exists($label, $language = null)
{
- return isset($this->statictext[$label][isset($language) ? $language : $this->actlanguage]) || $this->p['fallbacklanguage'] && isset($this->statictext[$label][$this->p['fallbacklanguage']]);
+ return (isset($this->statictext[$label][isset($language) ? $language : $this->actlanguage]) || $this->p['fallbacklanguage'] && isset($this->statictext[$label][$this->p['fallbacklanguage']])) ? $label : false;
}