From 6de96f33c4838ae8b99f1c943e18585b9faf3eca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no>
Date: Mon, 19 Jan 2009 20:53:00 +0000
Subject: [PATCH] Fix if description is not set..

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1169 44740490-163a-0410-bde0-09ae8108e29a
---
 modules/ldapstatus/templates/default/ldapstatus.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/ldapstatus/templates/default/ldapstatus.php b/modules/ldapstatus/templates/default/ldapstatus.php
index 6ac7cca3e..4697dd080 100644
--- a/modules/ldapstatus/templates/default/ldapstatus.php
+++ b/modules/ldapstatus/templates/default/ldapstatus.php
@@ -54,7 +54,11 @@ $classes = array('odd', 'even');
 foreach($this->data['sortedOrgIndex'] as $orgkey) {
 	$res = $this->data['results'][$orgkey];
 	echo('<tr class="' . ($classes[($i++ % 2)]) . '">');
-	echo('<td>' . htmlspecialchars($this->getTranslation($this->data['orgconfig'][$orgkey]['description'])) . '</td>');
+	if (array_key_exists('description', $this->data['orgconfig'][$orgkey])) {
+		echo('<td>' . htmlspecialchars($this->getTranslation($this->data['orgconfig'][$orgkey]['description'])) . '</td>');
+	} else {
+		echo('<span style="color: #b4b4b4; font-size: x-small">NA</span>');
+	}
 #	echo('<td><tt>' . htmlspecialchars($orgkey) . '</tt></td>');
 	showRes('config',  $res, $this);
 	showRes('configMeta',  $res, $this);
-- 
GitLab