Commit 4ea9b04c authored by haemmer's avatar haemmer

Applied patch for #602 provided by anonymous contributor

parent 43a71244
......@@ -625,7 +625,7 @@ function sortIdentityProviders(&$IDProviders){
$IDProviders = Array();
// Compose array
$showUnknownCategory = false;
$unknownCategoryIsEmpty = true;
while(list($categoryKey, $categoryValue) = each($sortedCategories)){
$IDProviders[$categoryKey] = $categoryValue;
......@@ -641,14 +641,14 @@ function sortIdentityProviders(&$IDProviders){
if ($categoryKey == 'unknown' || !isset($sortedCategories[$IDProvidersValue['Type']])){
$IDProviders[$IDProvidersPKey] = $IDProvidersValue;
unset($sortedIDProviders[$IDProvidersPKey]);
$showUnknownCategory = true;
$unknownCategoryIsEmpty = false;
}
}
}
// Check if unkown category is needed
if (!$showUnknownCategory){
if ($unknownCategoryIsEmpty || (count($sortedCategories) == 1)){
unset($IDProviders['unknown']);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment