diff --git a/modules/discopower/config-templates/module_discopower.php b/modules/discopower/config-templates/module_discopower.php index 0837bf76c1a64b38631825ca5a749d7a8e437a0a..50ca7aaba6aff81e18c3ce4ed8661a3de48a603e 100644 --- a/modules/discopower/config-templates/module_discopower.php +++ b/modules/discopower/config-templates/module_discopower.php @@ -15,6 +15,11 @@ $config = array ( * All other available tabs will be listed after the ones specified below. */ 'taborder' => array('norway'), + /* + * the 'tab' parameter allows you to limit the tabs to a specific list. (excluding unlisted tags) + * + * 'tabs' => array('norway', 'finland'), + */ ); diff --git a/modules/discopower/dictionaries/tabs.php b/modules/discopower/dictionaries/tabs.php index e792fb2b6fe35b01cd9263a14d6006b52222b401..6a4ccc70900d23fe43c102ee1d05706b038f05d4 100644 --- a/modules/discopower/dictionaries/tabs.php +++ b/modules/discopower/dictionaries/tabs.php @@ -8,16 +8,25 @@ $lang = array( ), 'kalmar' => array ( - 'no' => 'Kalmar', 'en' => 'Kalmar', + 'no' => 'Kalmar', ), - 'haka' => array ( + 'finland' => array ( 'no' => 'Finnland', 'en' => 'Finland', ), + + 'sweden' => array ( + 'no' => 'Sverige', + 'en' => 'Sweden', + ), - 'switch' => array ( + 'denmark' => array ( + 'no' => 'Danmark', + 'en' => 'Denmark', + ), + 'switzerland' => array ( 'no' => 'Sveits', 'en' => 'Switzerland', ), diff --git a/modules/discopower/lib/PowerIdPDisco.php b/modules/discopower/lib/PowerIdPDisco.php index 0cafc8b1d65551dc33487b8a7dc4f839f506c1ac..54875c2f91ae93646ec68e618da8b587c955f1c6 100644 --- a/modules/discopower/lib/PowerIdPDisco.php +++ b/modules/discopower/lib/PowerIdPDisco.php @@ -58,12 +58,15 @@ class sspmod_discopower_PowerIdPDisco extends SimpleSAML_XHTML_IdPDisco { } } + $enableTabs = $this->discoconfig->getValue('tabs', NULL); + foreach($list AS $key => $val) { $tags = array('misc'); if (array_key_exists('tags', $val)) { $tags = $val['tags']; } foreach ($tags AS $tag) { + if (!empty($enableTabs) && !in_array($tag, $enableTabs)) continue; $slist[$tag][$key] = $val; } }