diff options
author | Urban Müller | 2017-10-19 17:51:20 +0200 |
---|---|---|
committer | Urban Müller | 2017-10-19 17:51:20 +0200 |
commit | e8f13f87ebe461f5b72c057ce57fccc767b3dd4d (patch) | |
tree | 10040712adbfa88ed32e983580f176cdd2fb1bc6 | |
parent | ab4709cbff86e16a0f343cf3f8d44f05d1e53dc5 (diff) | |
download | itools-e8f13f87ebe461f5b72c057ce57fccc767b3dd4d.tar.gz itools-e8f13f87ebe461f5b72c057ce57fccc767b3dd4d.tar.bz2 itools-e8f13f87ebe461f5b72c057ce57fccc767b3dd4d.zip |
revert to old behaviour for now, some T() calls in map drawings want unmodified {foo}
-rw-r--r-- | auto_prepend.php | 4 | ||||
-rwxr-xr-x | tests/autoprepend.t | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/auto_prepend.php b/auto_prepend.php index ba42293..f4f0b1c 100644 --- a/auto_prepend.php +++ b/auto_prepend.php @@ -82,9 +82,7 @@ function T($label, $language = null, $values = null) if (is_array($language)) # Need to swap params? list($language, $values) = array($values, $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); + return is_array($values) ? $GLOBALS['it_text']->etext($label, array_map(array("it_html", "Q"), $values), $language) : $GLOBALS['it_text']->text($label, $language); } /** diff --git a/tests/autoprepend.t b/tests/autoprepend.t index 01da49e..bf40605 100755 --- a/tests/autoprepend.t +++ b/tests/autoprepend.t @@ -9,13 +9,13 @@ $GLOBALS['it_text']->statictext = array( is( T('foo'), - "bar ", + "bar {v1}", "simple T()" ); is( T('foo', 'en'), - "qux ", + "qux {v1}", "simple T() with language" ); |