From ca22bba732c4cb21d68969df10166d7d72360e7f Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Thu, 26 May 2011 10:56:01 +0000 Subject: [PATCH] discopower: Hide empty tabs. Thanks to Dyonisius Visser for fixing this! git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2851 44740490-163a-0410-bde0-09ae8108e29a --- modules/discopower/templates/disco-tpl.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/discopower/templates/disco-tpl.php b/modules/discopower/templates/disco-tpl.php index b235f59fa..29da8cb84 100644 --- a/modules/discopower/templates/disco-tpl.php +++ b/modules/discopower/templates/disco-tpl.php @@ -149,7 +149,9 @@ if (!empty($faventry)) { $tabs = array_keys( $this->data['idplist']); foreach ($tabs AS $tab) { - echo '<li><a href="#' . $tab . '"><span>' . $this->t('{discopower:tabs:' . $tab . '}') . '</span></a></li> '; + if(!empty($this->data['idplist'][$tab])) { + echo '<li><a href="#' . $tab . '"><span>' . $this->t('{discopower:tabs:' . $tab . '}') . '</span></a></li> '; + } } ?> -- GitLab