diff --git a/templates/logout.php b/templates/logout.php index 885f3a54b768a42900159dde64c032421de88500..0672ce7259115e49ae0c80d9e1eafc390ca7dd45 100644 --- a/templates/logout.php +++ b/templates/logout.php @@ -9,7 +9,7 @@ $this->includeAtTemplateBase('includes/header.php'); echo('<h2>' . $this->data['header'] . '</h2>'); echo('<p>' . $this->t('{logout:logged_out_text}') . '</p>'); -if($this->getTag($this->data['text']) !== NULL) { +if($this->getTranslator()->getTag($this->data['text']) !== NULL) { $this->data['text'] = $this->t($this->data['text']); } echo('<p>[ <a href="' . htmlspecialchars($this->data['link']) . '">' . diff --git a/templates/selectidp-dropdown.php b/templates/selectidp-dropdown.php index 1bb13def6b42009c7ed04f60869cae8ded7153bc..b9c3b73a7a682b4c2348e13503e7a93fdea0ffb0 100644 --- a/templates/selectidp-dropdown.php +++ b/templates/selectidp-dropdown.php @@ -9,12 +9,18 @@ $this->includeAtTemplateBase('includes/header.php'); foreach ($this->data['idplist'] as $idpentry) { if (!empty($idpentry['name'])) { - $this->includeInlineTranslation('idpname_'.$idpentry['entityid'], $idpentry['name']); + $this->getTranslator()->includeInlineTranslation( + 'idpname_'.$idpentry['entityid'], + $idpentry['name'] + ); } elseif (!empty($idpentry['OrganizationDisplayName'])) { - $this->includeInlineTranslation('idpname_'.$idpentry['entityid'], $idpentry['OrganizationDisplayName']); + $this->getTranslator()->includeInlineTranslation( + 'idpname_'.$idpentry['entityid'], + $idpentry['OrganizationDisplayName'] + ); } if (!empty($idpentry['description'])) { - $this->includeInlineTranslation('idpdesc_'.$idpentry['entityid'], $idpentry['description']); + $this->getTranslator()->includeInlineTranslation('idpdesc_'.$idpentry['entityid'], $idpentry['description']); } } ?> @@ -28,6 +34,7 @@ foreach ($this->data['idplist'] as $idpentry) { <select id="dropdownlist" name="idpentityid"> <?php usort($this->data['idplist'], function ($idpentry1, $idpentry2) { + // TODO: this is only compatible with PHP >= 5.4, fix compat with 5.3! return strcmp($this->t('idpname_'.$idpentry1['entityid']), $this->t('idpname_'.$idpentry2['entityid'])); }); diff --git a/templates/selectidp-links.php b/templates/selectidp-links.php index 079e8be664fb089875e76a790ee6353715a7e3ed..b8f2d6e3d89d6c6dd40244993108b3e1d8bfcded 100644 --- a/templates/selectidp-links.php +++ b/templates/selectidp-links.php @@ -8,12 +8,15 @@ $this->data['autofocus'] = 'preferredidp'; $this->includeAtTemplateBase('includes/header.php'); foreach ($this->data['idplist'] as $idpentry) { if (isset($idpentry['name'])) { - $this->includeInlineTranslation('idpname_'.$idpentry['entityid'], $idpentry['name']); + $this->getTranslator()->includeInlineTranslation('idpname_'.$idpentry['entityid'], $idpentry['name']); } elseif (isset($idpentry['OrganizationDisplayName'])) { - $this->includeInlineTranslation('idpname_'.$idpentry['entityid'], $idpentry['OrganizationDisplayName']); + $this->getTranslator()->includeInlineTranslation( + 'idpname_'.$idpentry['entityid'], + $idpentry['OrganizationDisplayName'] + ); } if (isset($idpentry['description'])) { - $this->includeInlineTranslation('idpdesc_'.$idpentry['entityid'], $idpentry['description']); + $this->getTranslator()->includeInlineTranslation('idpdesc_'.$idpentry['entityid'], $idpentry['description']); } } ?> diff --git a/templates/status.php b/templates/status.php index 23f8877182644e2b34ac6ca440d22a978b76dcd2..25b6e020792418f7801ddc3b1ee0dccf87b0a6fc 100644 --- a/templates/status.php +++ b/templates/status.php @@ -1,6 +1,6 @@ <?php if (array_key_exists('header', $this->data)) { - if ($this->getTag($this->data['header']) !== null) { + if ($this->getTranslator()->getTag($this->data['header']) !== null) { $this->data['header'] = $this->t($this->data['header']); } }