Skip to content
Snippets Groups Projects
Commit 73d6b345 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

fix bug where consent tried to use undefined variable

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1194 44740490-163a-0410-bde0-09ae8108e29a
parent 032a3015
No related branches found
No related tags found
No related merge requests found
......@@ -46,14 +46,6 @@ if (array_key_exists('name', $this->data['dstMetadata'])) {
$dstName = $this->data['dstMetadata']['entityid'];
}
if (array_key_exists('descr_purpose', $this->data['dstMetadata'])) {
$spPurpose = $this->data['dstMetadata']['descr_purpose'];
if (is_array($spPurpose)) {
$spPurpose = $this->t($spPurpose);
}
}
$attributes = $this->data['attributes'];
......@@ -89,18 +81,19 @@ $(document).ready(function() {
';
$this->includeAtTemplateBase('includes/header.php');
?>
<p>
<?php
echo $this->t('{consent:consent_notice}', array( 'SPNAME' => $dstName ));
if ($spPurpose) echo '</p><p>' . $this->t('{consent:consent_purpose}', array( 'SPNAME' => $dstName, 'SPDESC' => $spPurpose ));
echo $this->t('{consent:consent_notice}', array( 'SPNAME' => $dstName ));
if (array_key_exists('descr_purpose', $this->data['dstMetadata'])) {
echo '</p><p>' . $this->t('{consent:consent_purpose}', array(
'SPNAME' => $dstName,
'SPDESC' => $this->getTranslation(SimpleSAML_Utilities::arrayize($this->data['dstMetadata']['descr_purpose'], 'en')),
));
}
?>
</p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment