From 3a083ebbe1af496c461d7857ec2ea8dd92fca912 Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Mon, 23 Nov 2009 13:58:56 +0000
Subject: [PATCH] Fix metadata format on generated simpleSAMLphp metadata.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2006 44740490-163a-0410-bde0-09ae8108e29a
---
 modules/saml/www/sp/metadata.php | 2 +-
 www/saml2/idp/metadata.php       | 2 +-
 www/saml2/sp/metadata.php        | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/saml/www/sp/metadata.php b/modules/saml/www/sp/metadata.php
index df6d1f0b4..16b600863 100644
--- a/modules/saml/www/sp/metadata.php
+++ b/modules/saml/www/sp/metadata.php
@@ -66,7 +66,7 @@ if (array_key_exists('output', $_REQUEST) && $_REQUEST['output'] == 'xhtml') {
 
 	$t->data['header'] = 'saml20-sp';
 	$t->data['metadata'] = htmlspecialchars($xml);
-	$t->data['metadataflat'] = var_export($entityId, TRUE) . ' => ' . var_export($metaArray20, TRUE) . ',';
+	$t->data['metadataflat'] = '$metadata[' . var_export($entityId, TRUE) . '] = ' . var_export($metaArray20, TRUE) . ';';
 	$t->data['metaurl'] = $source->getMetadataURL();
 
 	$t->data['idpsend'] = array();
diff --git a/www/saml2/idp/metadata.php b/www/saml2/idp/metadata.php
index 2fb5d491d..3f172bd67 100644
--- a/www/saml2/idp/metadata.php
+++ b/www/saml2/idp/metadata.php
@@ -66,7 +66,7 @@ try {
 	}
 
 
-	$metaflat = var_export($idpentityid, TRUE) . ' => ' . var_export($metaArray, TRUE) . ',';
+	$metaflat = '$metadata[' . var_export($idpentityid, TRUE) . '] = ' . var_export($metaArray, TRUE) . ';';
 
 	$metaArray['certData'] = $certInfo['certData'];
 	$metaBuilder = new SimpleSAML_Metadata_SAMLBuilder($idpentityid);
diff --git a/www/saml2/sp/metadata.php b/www/saml2/sp/metadata.php
index ba3c13267..8ee0faf95 100644
--- a/www/saml2/sp/metadata.php
+++ b/www/saml2/sp/metadata.php
@@ -49,7 +49,7 @@ try {
 		$metaArray['certData'] = $certInfo['certData'];
 	}
 
-	$metaflat = var_export($spentityid, TRUE) . ' => ' . var_export($metaArray, TRUE) . ',';
+	$metaflat = '$metadata[' . var_export($spentityid, TRUE) . '] = ' . var_export($metaArray, TRUE) . ';';
 
 	$metaBuilder = new SimpleSAML_Metadata_SAMLBuilder($spentityid);
 	$metaBuilder->addMetadataSP20($metaArray);
-- 
GitLab