From 575831964d10611307e0bbff2b289af2c9ba7355 Mon Sep 17 00:00:00 2001 From: Jaime Perez Crespo <jaime.perez@uninett.no> Date: Fri, 5 Feb 2016 15:16:52 +0100 Subject: [PATCH] Bugfixes. The translator property of SimpleSAML_XHTML_Template is no longer public. --- templates/includes/attributes.php | 4 ++-- templates/includes/header.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/includes/attributes.php b/templates/includes/attributes.php index b51776380..48eb0cc78 100644 --- a/templates/includes/attributes.php +++ b/templates/includes/attributes.php @@ -30,7 +30,7 @@ function present_assoc($attr) { } } -function present_attributes($t, $attributes, $nameParent) { +function present_attributes(SimpleSAML_XHTML_Template $t, $attributes, $nameParent) { $alternate = array('odd', 'even'); $i = 0; $parentStr = (strlen($nameParent) > 0)? strtolower($nameParent) . '_': ''; @@ -40,7 +40,7 @@ function present_attributes($t, $attributes, $nameParent) { foreach ($attributes as $name => $value) { $nameraw = $name; - $name = $t->translator->getAttributeTranslation($parentStr . $nameraw); + $name = $t->getTranslator()->getAttributeTranslation($parentStr . $nameraw); if (preg_match('/^child_/', $nameraw)) { $parentName = preg_replace('/^child_/', '', $nameraw); diff --git a/templates/includes/header.php b/templates/includes/header.php index c787f8783..3982c8bf5 100644 --- a/templates/includes/header.php +++ b/templates/includes/header.php @@ -191,7 +191,7 @@ if($onLoad !== '') { if ($current) { $textarray[] = $langnames[$lang]; } else { - $textarray[] = '<a href="' . htmlspecialchars(\SimpleSAML\Utils\HTTP::addURLParameters(\SimpleSAML\Utils\HTTP::getSelfURL(), array($this->translator->language->languageParameterName => $lang))) . '">' . + $textarray[] = '<a href="' . htmlspecialchars(\SimpleSAML\Utils\HTTP::addURLParameters(\SimpleSAML\Utils\HTTP::getSelfURL(), array($this->getTranslator()->language->languageParameterName => $lang))) . '">' . $langnames[$lang] . '</a>'; } } -- GitLab