summaryrefslogtreecommitdiff
path: root/auto_prepend.php
diff options
context:
space:
mode:
authorUrban Müller2017-10-16 18:22:27 +0200
committerUrban Müller2017-10-16 18:22:27 +0200
commit8d90e01b7ffa90519ce7393175ddd446c69fe84c (patch)
treee40cf9ac706c54c5e295d20bd172f3540d75b471 /auto_prepend.php
parentc63ef15a33d671786ca7e3012b50ba1ad684cf92 (diff)
downloaditools-8d90e01b7ffa90519ce7393175ddd446c69fe84c.tar.gz
itools-8d90e01b7ffa90519ce7393175ddd446c69fe84c.tar.bz2
itools-8d90e01b7ffa90519ce7393175ddd446c69fe84c.zip
allow simple functions calls in ET() and T() labels
Diffstat (limited to 'auto_prepend.php')
-rw-r--r--auto_prepend.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/auto_prepend.php b/auto_prepend.php
index f4f0b1c..ba42293 100644
--- a/auto_prepend.php
+++ b/auto_prepend.php
@@ -82,7 +82,9 @@ function T($label, $language = null, $values = null)
if (is_array($language)) # Need to swap params?
list($language, $values) = array($values, $language);
- return is_array($values) ? $GLOBALS['it_text']->etext($label, array_map(array("it_html", "Q"), $values), $language) : $GLOBALS['it_text']->text($label, $language);
+ $result = $GLOBALS['it_text']->text($label, $language);
+
+ return strpos($result, "{") === false ? $result : it_text::transmogrify($result, array_map(array("it_html", "Q"), (array)$values), $label, $GLOBALS['it_text']->allowedfuncs);
}
/**