diff options
author | Andreas Åkre Solberg <andreas.solberg@uninett.no> | 2009-10-23 19:12:57 +0000 |
---|---|---|
committer | Andreas Åkre Solberg <andreas.solberg@uninett.no> | 2009-10-23 19:12:57 +0000 |
commit | db3af123e775b475dd8b7ae3df871fe44f786255 (patch) | |
tree | 2279c537808e4becc135c546b4a5d21ad56aacb6 /lib/SimpleSAML/Metadata/MetaDataStorageHandler.php | |
parent | 821c23be6d289250a91caf7cfe71c187cc074b11 (diff) | |
download | simplesamlphp-db3af123e775b475dd8b7ae3df871fe44f786255.zip simplesamlphp-db3af123e775b475dd8b7ae3df871fe44f786255.tar.gz simplesamlphp-db3af123e775b475dd8b7ae3df871fe44f786255.tar.bz2 |
Only list entities that are not expired...
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1896 44740490-163a-0410-bde0-09ae8108e29a
Diffstat (limited to 'lib/SimpleSAML/Metadata/MetaDataStorageHandler.php')
-rw-r--r-- | lib/SimpleSAML/Metadata/MetaDataStorageHandler.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php b/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php index 86ea167..1bc23c5 100644 --- a/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php +++ b/lib/SimpleSAML/Metadata/MetaDataStorageHandler.php @@ -167,6 +167,16 @@ class SimpleSAML_Metadata_MetaDataStorageHandler { foreach($this->sources as $source) { $srcList = $source->getMetadataSet($set); + foreach($srcList AS $key => $le) { + if (array_key_exists('expire', $le)) { + if ($le['expire'] < time()) { + unset($srcList[$key]); + } + } + } + + + /* $result is the last argument to array_merge because we want the content already * in $result to have precedence. */ |