Skip to content
Snippets Groups Projects
Commit 13d49cad authored by Jaime Pérez's avatar Jaime Pérez
Browse files

Merge pull request #97 from thijskh/master

Check that IdP names contain content before attempting translation.
parents 1e51cb81 bbf5e1d1
No related branches found
No related tags found
No related merge requests found
...@@ -10,18 +10,18 @@ $this->data['autofocus'] = 'dropdownlist'; ...@@ -10,18 +10,18 @@ $this->data['autofocus'] = 'dropdownlist';
$this->includeAtTemplateBase('includes/header.php'); $this->includeAtTemplateBase('includes/header.php');
foreach ($this->data['idplist'] AS $idpentry) { foreach ($this->data['idplist'] AS $idpentry) {
if (isset($idpentry['UIInfo']['DisplayName'])) { if (!empty($idpentry['UIInfo']['DisplayName'])) {
/* TODO: remove this branch, If ['UIInfo']['DisplayName'] is available, it will get through to 'name' in the /* TODO: remove this branch, If ['UIInfo']['DisplayName'] is available, it will get through to 'name' in the
* metadata parsed with SSP >= 1.13.0, so this code is no longer necessary. Keep it now to avoid breaking * metadata parsed with SSP >= 1.13.0, so this code is no longer necessary. Keep it now to avoid breaking
* metadata parsed with previous versions. * metadata parsed with previous versions.
*/ */
$this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['UIInfo']['DisplayName']); $this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['UIInfo']['DisplayName']);
} elseif (isset($idpentry['name'])) { } elseif (!empty($idpentry['name'])) {
$this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['name']); $this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['name']);
} elseif (isset($idpentry['OrganizationDisplayName'])) { } elseif (!empty($idpentry['OrganizationDisplayName'])) {
$this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['OrganizationDisplayName']); $this->includeInlineTranslation('idpname_' . $idpentry['entityid'], $idpentry['OrganizationDisplayName']);
} }
if (isset($idpentry['description'])) if (!empty($idpentry['description']))
$this->includeInlineTranslation('idpdesc_' . $idpentry['entityid'], $idpentry['description']); $this->includeInlineTranslation('idpdesc_' . $idpentry['entityid'], $idpentry['description']);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment