From bff70e8889fcf2810d6adcb394e9d4a94b4df3df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no> Date: Fri, 6 Mar 2009 11:59:08 +0000 Subject: [PATCH] Support fallback to not translate input in t() git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1384 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/XHTML/Template.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php index 8872869a6..bea72df21 100644 --- a/lib/SimpleSAML/XHTML/Template.php +++ b/lib/SimpleSAML/XHTML/Template.php @@ -327,7 +327,7 @@ class SimpleSAML_XHTML_Template { * values in the translated string. * @return string The translated tag, or a placeholder value if the tag wasn't found. */ - public function t($tag, $replacements = array(), $fallbackdefault = true, $oldreplacements = array(), $striptags = false) { + public function t($tag, $replacements = array(), $fallbackdefault = true, $oldreplacements = array(), $striptags = FALSE) { if(!is_array($replacements)) { /* Old style call to t(...). Print warning to log. */ @@ -353,7 +353,7 @@ class SimpleSAML_XHTML_Template { if($tagData === NULL) { /* Tag not found. */ SimpleSAML_Logger::info('Template: Looking up [' . $tag . ']: not translated at all.'); - return $this->t_not_translated($tag, TRUE); + return $this->t_not_translated($tag, $fallbackdefault); } } @@ -379,7 +379,7 @@ class SimpleSAML_XHTML_Template { if ($fallbacktag) { return 'not translated (' . $tag . ')'; } else { - return NULL; + return $tag; } } -- GitLab