From 43b34c3b0b8f7e07c407c12fe1246a92e457151f Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Mon, 6 Aug 2018 11:42:53 +0200
Subject: [PATCH] Fix merging error

---
 modules/consent/www/getconsent.php | 35 ++----------------------------
 1 file changed, 2 insertions(+), 33 deletions(-)

diff --git a/modules/consent/www/getconsent.php b/modules/consent/www/getconsent.php
index 4b9065c84..2bdfc82b8 100644
--- a/modules/consent/www/getconsent.php
+++ b/modules/consent/www/getconsent.php
@@ -127,37 +127,6 @@ $t->data['attributes'] = $attributes;
 $t->data['checked'] = $state['consent:checked'];
 $t->data['stateId'] = $id;
 
-$srcName = htmlspecialchars(is_array($srcName) ? $t->t($srcName) : $srcName);
-$dstName = htmlspecialchars(is_array($dstName) ? $t->t($dstName) : $dstName);
-
-$t->data['consent_attributes_header'] = $t->t(
-    '{consent:consent:consent_attributes_header}',
-    array('SPNAME' => $dstName, 'IDPNAME' => $srcName)
-);
-
-$t->data['consent_accept'] = $t->t(
-    '{consent:consent:consent_accept}',
-    array('SPNAME' => $dstName, 'IDPNAME' => $srcName)
-);
-
-if (array_key_exists('descr_purpose', $state['Destination'])) {
-    $t->data['consent_purpose'] = $t->t(
-        '{consent:consent:consent_purpose}',
-        array(
-            'SPNAME' => $dstName,
-            'SPDESC' => $translator->getPreferredTranslation(
-                \SimpleSAML\Utils\Arrays::arrayize(
-                    $state['Destination']['descr_purpose'],
-                    'en'
-                )
-            ),
-        )
-    );
-}
-
-$t->data['srcName'] = $srcName;
-$t->data['dstName'] = $dstName;
-
 $srcName = htmlspecialchars(is_array($srcName) ? $translator->t($srcName) : $srcName);
 $dstName = htmlspecialchars(is_array($dstName) ? $translator->t($dstName) : $dstName);
 
@@ -247,7 +216,7 @@ function present_attributes($t, $attributes, $nameParent)
 
     $alternate = array('odd', 'even');
     $i = 0;
-    $summary = 'summary="'.$t->t('{consent:consent:table_summary}').'"';
+    $summary = 'summary="'.$translator->t('{consent:consent:table_summary}').'"';
 
     if (strlen($nameParent) > 0) {
         $parentStr = strtolower($nameParent).'_';
@@ -255,7 +224,7 @@ function present_attributes($t, $attributes, $nameParent)
     } else {
         $parentStr = '';
         $str = '<table id="table_with_attributes"  class="attributes" '.$summary.'>';
-        $str .= "\n".'<caption>'.$t->t('{consent:consent:table_caption}').'</caption>';
+        $str .= "\n".'<caption>'.$translator->t('{consent:consent:table_caption}').'</caption>';
     }
 
     foreach ($attributes as $name => $value) {
-- 
GitLab