From ca7d04947da2fe77998eb566e148d7c9e9b5f83a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no>
Date: Tue, 25 Mar 2008 11:58:06 +0000
Subject: [PATCH] Status templates now accepts logout link to be null, when
 logout is not supported. used by diagnostics page and shibboleth example

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@423 44740490-163a-0410-bde0-09ae8108e29a
---
 templates/default/en/status.php       | 5 ++++-
 www/example-simple/hostnames.php      | 2 +-
 www/example-simple/shib13-example.php | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/templates/default/en/status.php b/templates/default/en/status.php
index 420934412..7f6bb4a74 100644
--- a/templates/default/en/status.php
+++ b/templates/default/en/status.php
@@ -36,9 +36,12 @@
 		?>
 		</table>
 
+	<?php if (isset($this->data['logout'])) { ?>
 	<h2>Logout</h2>
 
-		<p><?php echo $data['logout']; ?></p>
+		<p><?php echo $this->data['logout']; ?></p>
+
+	<?php } ?>
 	
 	<h2>About simpleSAMLphp</h2>
 	<p>Hey! This simpleSAMLphp thing is pretty cool, where can I read more about it?
diff --git a/www/example-simple/hostnames.php b/www/example-simple/hostnames.php
index 55458ed23..9a06cb8c8 100644
--- a/www/example-simple/hostnames.php
+++ b/www/example-simple/hostnames.php
@@ -47,7 +47,7 @@ $et->data['header'] = 'SimpleSAMLphp Diagnostics';
 $et->data['remaining'] = 'na';
 $et->data['attributes'] = $attributes;
 $et->data['valid'] = 'na';
-$et->data['logout'] = '';
+$et->data['logout'] = null;
 
 $et->show();
 
diff --git a/www/example-simple/shib13-example.php b/www/example-simple/shib13-example.php
index a87da040d..dbbf689c1 100644
--- a/www/example-simple/shib13-example.php
+++ b/www/example-simple/shib13-example.php
@@ -50,7 +50,7 @@ $t = new SimpleSAML_XHTML_Template($config, 'status.php');
 $t->data['header'] = 'Shibboleth demo';
 $t->data['remaining'] = $session->remainingTime();
 $t->data['attributes'] = $session->getAttributes();
-$t->data['logout'] = 'Shibboleth logout not implemented yet.';
+$t->data['logout'] = null;
 $et->data['icon'] = 'bino.png';
 $t->show();
 
-- 
GitLab