Revision: 2025
Author: olavmrk
Date: Thu Dec  3 05:58:02 2009
Log: SAMLBuilder: Use getLocalizedString.
http://code.google.com/p/simplesamlphp/source/detail?r=2025

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

=======================================
--- /trunk/lib/SimpleSAML/Metadata/SAMLBuilder.php      Thu Dec  3 05:57:54 2009
+++ /trunk/lib/SimpleSAML/Metadata/SAMLBuilder.php      Thu Dec  3 05:58:02 2009
@@ -330,23 +330,15 @@
                        $attributeconsumer = 
$this->createElement('AttributeConsumingService');
                        $attributeconsumer->setAttribute('index', '0');

-                       $name = $metadata->getArrayizeString('name');
+                       $name = $metadata->getLocalizedString('name');
                        foreach($name AS $lang => $localname) {
-                               if ($lang === 0) {
-                                       /* We use 'en' as the default language. 
*/
-                                       $lang = 'en';
-                               }
                                $t = $this->createTextElement('ServiceName', 
$localname);
                                $t->setAttribute('xml:lang', $lang);
                                $attributeconsumer->appendChild($t);
                        }

-                       $description = 
$metadata->getArrayizeString('description', array());
+                       $description = 
$metadata->getLocalizedString('description', array());
                        foreach ($description as $lang => $localname) {
-                               if ($lang === 0) {
-                                       /* We use 'en' as the default language. 
*/
-                                       $lang = 'en';
-                               }
                                $t = 
$this->createTextElement('ServiceDescription', $localname);
                                $t->setAttribute('xml:lang', $lang);
                                $attributeconsumer->appendChild($t);

--

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