From a395329b1bf1e7d90fa152daeaa6fe104078a9d9 Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Sun, 3 Feb 2019 22:23:42 +0100
Subject: [PATCH] Fixes for modules/consentAdmin

---
 modules/consentAdmin/hooks/hook_configpage.php |  2 +-
 modules/consentAdmin/www/consentAdmin.php      | 12 +++++++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/modules/consentAdmin/hooks/hook_configpage.php b/modules/consentAdmin/hooks/hook_configpage.php
index 2ea75afb1..fc9384f98 100644
--- a/modules/consentAdmin/hooks/hook_configpage.php
+++ b/modules/consentAdmin/hooks/hook_configpage.php
@@ -3,8 +3,8 @@
  * Hook to add the consentAdmin module to the config page.
  *
  * @param \SimpleSAML\XHTML\Template $template The template that we should alter in this hook.
+ * @return void
  */
-
 function consentAdmin_hook_configpage(\SimpleSAML\XHTML\Template &$template)
 {
     $template->data['links']['consentAdmin'] = [
diff --git a/modules/consentAdmin/www/consentAdmin.php b/modules/consentAdmin/www/consentAdmin.php
index 17a091d08..00716e1e3 100644
--- a/modules/consentAdmin/www/consentAdmin.php
+++ b/modules/consentAdmin/www/consentAdmin.php
@@ -14,6 +14,16 @@
 /*
  * Runs the processing chain and ignores all filter which have user
  * interaction.
+ *
+ * @param array $idp_metadata
+ * @param string $source
+ * @param array $sp_metadata
+ * @param string $sp_entityid
+ * @param array $attributes
+ * @param string $userid
+ * @param bool $hashAttributes
+ * @param array $excludeAttributes
+ * @return array
  */
 function driveProcessingChain(
     $idp_metadata,
@@ -107,7 +117,6 @@ $metadata = \SimpleSAML\Metadata\MetaDataStorageHandler::getMetadataHandler();
  * Get IdP id and metadata
  */
 
-
 $idp_entityid = $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted');
 $idp_metadata = $metadata->getMetaData($idp_entityid, 'saml20-idp-hosted');
 
@@ -176,6 +185,7 @@ if ($action !== null && $sp_entityid !== null) {
         'consentAdmin:consentadminajax.php',
         'consentAdmin:consentadmin'
     );
+    $translator = $t->getTranslator();
 
     // Get SP metadata
     $sp_metadata = $metadata->getMetaData($sp_entityid, 'saml20-sp-remote');
-- 
GitLab