Skip to content
Snippets Groups Projects
Commit 3aa8c47c authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

add information about expiratino on metadata on frontpage

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1427 44740490-163a-0410-bde0-09ae8108e29a
parent ac97274c
No related branches found
No related tags found
No related merge requests found
...@@ -168,6 +168,7 @@ function mtype($set) { ...@@ -168,6 +168,7 @@ function mtype($set) {
} }
} }
$now = time();
echo '<dl>'; echo '<dl>';
if (is_array($this->data['metaentries']['hosted']) && count($this->data['metaentries']['hosted']) > 0) if (is_array($this->data['metaentries']['hosted']) && count($this->data['metaentries']['hosted']) > 0)
foreach ($this->data['metaentries']['hosted'] AS $hm) { foreach ($this->data['metaentries']['hosted'] AS $hm) {
...@@ -180,6 +181,8 @@ foreach ($this->data['metaentries']['hosted'] AS $hm) { ...@@ -180,6 +181,8 @@ foreach ($this->data['metaentries']['hosted'] AS $hm) {
echo '<br /><strong>' . $this->getTranslation(SimpleSAML_Utilities::arrayize($hm['name'], 'en')) . '</strong>'; echo '<br /><strong>' . $this->getTranslation(SimpleSAML_Utilities::arrayize($hm['name'], 'en')) . '</strong>';
if (array_key_exists('descr', $hm)) if (array_key_exists('descr', $hm))
echo '<br /><strong>' . $this->getTranslation(SimpleSAML_Utilities::arrayize($hm['descr'], 'en')) . '</strong>'; echo '<br /><strong>' . $this->getTranslation(SimpleSAML_Utilities::arrayize($hm['descr'], 'en')) . '</strong>';
echo '<br />[ <a href="' . $hm['metadata-url'] . '">' . $this->t('show_metadata') . '</a> ]'; echo '<br />[ <a href="' . $hm['metadata-url'] . '">' . $this->t('show_metadata') . '</a> ]';
...@@ -199,6 +202,14 @@ foreach($this->data['metaentries']['remote'] AS $setkey => $set) { ...@@ -199,6 +202,14 @@ foreach($this->data['metaentries']['remote'] AS $setkey => $set) {
} else { } else {
echo $entry['entityid']; echo $entry['entityid'];
} }
if (array_key_exists('expire', $entry)) {
if ($entry['expire'] < $now) {
echo('<span style="color: #500; font-weight: bold"> (expired ' . number_format(($now - $entry['expire'])/3600, 1) . ' hours ago)</span>');
} else {
echo(' (expires in ' . number_format(($entry['expire'] - $now)/3600, 1) . ' hours)');
}
}
echo '</li>'; echo '</li>';
} }
echo '</ul>'; echo '</ul>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment