Revision: 1832
Author: [email protected]
Date: Thu Oct  8 05:10:33 2009
Log: Made addMeatdataSP20 and addMetadataIdP20 call addContact instead on  
only adding emailaddress and surname

http://code.google.com/p/simplesamlphp/source/detail?r=1832

Modified:
  /trunk/lib/SimpleSAML/Metadata/SAMLBuilder.php

=======================================
--- /trunk/lib/SimpleSAML/Metadata/SAMLBuilder.php      Tue Sep  1 04:40:32 2009
+++ /trunk/lib/SimpleSAML/Metadata/SAMLBuilder.php      Thu Oct  8 05:10:33 2009
@@ -336,19 +336,8 @@

                if (array_key_exists('contacts', $metadata) &&  
is_array($metadata['contacts']) ) {
                        foreach($metadata['contacts'] AS $contact) {
-                               if (array_key_exists('contactType', $contact) 
&&  
array_key_exists('EmailAddress', $contact)) {
-                                       $t = 
$this->createElement('ContactPerson');
-                                       $t->setAttribute('contactType', 
$contact['contactType']);
-
-                                       if (array_key_exists('SurName', 
$contact)) {
-                                               $surname = 
$this->createTextElement('SurName', $contact['SurName']);
-                                               $t->appendChild($surname);
-                                       }
-
-                                       $email = 
$this->createTextElement('EmailAddress',  
$contact['EmailAddress']);
-                                       $t->appendChild($email);
-
-                                       
$this->entityDescriptor->appendChild($t);
+                               if (array_key_exists('contactType', $contact) 
&&  
array_key_exists('emailAddress', $contact)) {
+                    $this->addContact($contact['contactType'], $contact);
                                }
                        }
                }
@@ -408,19 +397,8 @@

                if (array_key_exists('contacts', $metadata) &&  
is_array($metadata['contacts']) ) {
                        foreach($metadata['contacts'] AS $contact) {
-                               if (array_key_exists('contactType', $contact) 
&&  
array_key_exists('EmailAddress', $contact)) {
-                                       $t = 
$this->createElement('ContactPerson');
-                                       $t->setAttribute('contactType', 
$contact['contactType']);
-
-                                       if (array_key_exists('SurName', 
$contact)) {
-                                               $surname = 
$this->createTextElement('SurName', $contact['SurName']);
-                                               $t->appendChild($surname);
-                                       }
-
-                                       $email = 
$this->createTextElement('EmailAddress',  
$contact['EmailAddress']);
-                                       $t->appendChild($email);
-
-                                       
$this->entityDescriptor->appendChild($t);
+                               if (array_key_exists('contactType', $contact) 
&&  
array_key_exists('emailAddress', $contact)) {
+                    $this->addContact($contact['contactType'], $contact);
                                }
                        }
                }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"simpleSAMLphp commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/simplesamlphp-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to