From c2830a4fe1cfc2a10965f6daf76386a740ba571f Mon Sep 17 00:00:00 2001 From: "jaimepc@gmail.com" Date: Thu, 27 Feb 2014 09:44:19 +0000 Subject: [PATCH] Honour UIInfo/DisplayName in IdP's metadata in the IdP selection templates. git-svn-id: http://simplesamlphp.googlecode.com/svn/trunk@3398 44740490-163a-0410-bde0-09ae8108e29a --- templates/selectidp-dropdown.php | 4 +++- templates/selectidp-links.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/templates/selectidp-dropdown.php b/templates/selectidp-dropdown.php index c7aaa1c6..6f54bbf5 100644 --- a/templates/selectidp-dropdown.php +++ b/templates/selectidp-dropdown.php @@ -10,7 +10,9 @@ $this->data['autofocus'] = 'dropdownlist'; $this->includeAtTemplateBase('includes/header.php'); foreach ($this->data['idplist'] AS $idpentry) { - if (isset($idpentry['name'])) { + if (isset($idpentry['UIInfo']['DisplayName'])) { + $this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['UIInfo']['DisplayName']); + } elseif (isset($idpentry['name'])) { $this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['name']); } elseif (isset($idpentry['OrganizationDisplayName'])) { $this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['OrganizationDisplayName']); diff --git a/templates/selectidp-links.php b/templates/selectidp-links.php index 85aa3ca8..07635251 100644 --- a/templates/selectidp-links.php +++ b/templates/selectidp-links.php @@ -10,7 +10,9 @@ $this->data['autofocus'] = 'preferredidp'; $this->includeAtTemplateBase('includes/header.php'); foreach ($this->data['idplist'] AS $idpentry) { - if (isset($idpentry['name'])) { + if (isset($idpentry['UIInfo']['DisplayName'])) { + $this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['UIInfo']['DisplayName']); + } elseif (isset($idpentry['name'])) { $this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['name']); } elseif (isset($idpentry['OrganizationDisplayName'])) { $this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['OrganizationDisplayName']);