Skip to content
Snippets Groups Projects
Commit c782a225 authored by Thijs Kinkhorst's avatar Thijs Kinkhorst
Browse files

IdpDisco: make sorting case insensitive and apply it also to the 'links' variant

parent 5717c94d
No related branches found
No related tags found
No related merge requests found
...@@ -34,7 +34,7 @@ foreach ($this->data['idplist'] as $idpentry) { ...@@ -34,7 +34,7 @@ foreach ($this->data['idplist'] as $idpentry) {
<select id="dropdownlist" name="idpentityid"> <select id="dropdownlist" name="idpentityid">
<?php <?php
usort($this->data['idplist'], function ($idpentry1, $idpentry2) { usort($this->data['idplist'], function ($idpentry1, $idpentry2) {
return strcmp( return strcasecmp(
$this->t('idpname_'.$idpentry1['entityid']), $this->t('idpname_'.$idpentry1['entityid']),
$this->t('idpname_'.$idpentry2['entityid']) $this->t('idpname_'.$idpentry2['entityid'])
); );
......
...@@ -34,6 +34,12 @@ foreach ($this->data['idplist'] as $idpentry) { ...@@ -34,6 +34,12 @@ foreach ($this->data['idplist'] as $idpentry) {
} }
?></p> ?></p>
<?php <?php
usort($this->data['idplist'], function ($idpentry1, $idpentry2) {
return strcasecmp(
$this->t('idpname_'.$idpentry1['entityid']),
$this->t('idpname_'.$idpentry2['entityid'])
);
});
if (!empty($this->data['preferredidp']) && if (!empty($this->data['preferredidp']) &&
array_key_exists($this->data['preferredidp'], $this->data['idplist']) array_key_exists($this->data['preferredidp'], $this->data['idplist'])
) { ) {
......
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