Revision: 2241
Author: olavmrk
Date: Fri Mar 26 07:02:02 2010
Log: metaedit: Set index-property correctly.
http://code.google.com/p/simplesamlphp/source/detail?r=2241
Modified:
/trunk/modules/metaedit/lib/MetaEditor.php
=======================================
--- /trunk/modules/metaedit/lib/MetaEditor.php Fri Mar 26 06:00:21 2010
+++ /trunk/modules/metaedit/lib/MetaEditor.php Fri Mar 26 07:02:02 2010
@@ -18,10 +18,16 @@
}
}
- protected function getEndpointField($request, &$metadata, $key, $binding)
{
+ protected function getEndpointField($request, &$metadata, $key, $binding,
$indexed) {
if (array_key_exists('field_' . $key, $request)) {
- $e = array(array('Binding' => $binding, 'Location' =>
$request['field_' . $key], 'index' => '0'));
- $metadata[$key] = $e;
+ $e = array(
+ 'Binding' => $binding,
+ 'Location' => $request['field_' . $key]
+ );
+ if ($indexed) {
+ $e['index'] = 0;
+ }
+ $metadata[$key] = array($e);
} else {
if (isset($metadata[$key])) unset($metadata[$key]);
}
@@ -31,8 +37,8 @@
$this->getStandardField($request, $metadata, 'entityid');
$this->getStandardField($request, $metadata, 'name');
$this->getStandardField($request, $metadata, 'description');
- $this->getEndpointField($request, $metadata, 'AssertionConsumerService',
SAML2_Const::BINDING_HTTP_POST);
- $this->getEndpointField($request, $metadata, 'SingleLogoutService',
SAML2_Const::BINDING_HTTP_REDIRECT);
+ $this->getEndpointField($request, $metadata, 'AssertionConsumerService',
SAML2_Const::BINDING_HTTP_POST, TRUE);
+ $this->getEndpointField($request, $metadata, 'SingleLogoutService',
SAML2_Const::BINDING_HTTP_REDIRECT, FALSE);
// $this->getStandardField($request, $metadata,
'certFingerprint');
$metadata['updated'] = time();
--
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.