From 7076b55f6be685a71fce93be460f0331fb7dd8d5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no>
Date: Mon, 28 Jun 2010 10:58:26 +0000
Subject: [PATCH] Add new hook portalextras, that allows a module to modify the
 portal configuration in code  (not only config)

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2369 44740490-163a-0410-bde0-09ae8108e29a
---
 modules/portal/hooks/hook_htmlinject.php | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/modules/portal/hooks/hook_htmlinject.php b/modules/portal/hooks/hook_htmlinject.php
index 4254aa1ea..83f0f2575 100644
--- a/modules/portal/hooks/hook_htmlinject.php
+++ b/modules/portal/hooks/hook_htmlinject.php
@@ -23,11 +23,11 @@ function portal_hook_htmlinject(&$hookinfo) {
 		$allLinks = array_merge($allLinks, $ls);
 	}
 
-	$portal = new sspmod_portal_Portal($allLinks,
-		$portalConfig->getValue('pagesets', array(
-			array('frontpage_welcome', 'frontpage_config', 'frontpage_auth', 'frontpage_federation'),
-		)) 
-	);
+	$pagesets = $portalConfig->getValue('pagesets', array(
+		array('frontpage_welcome', 'frontpage_config', 'frontpage_auth', 'frontpage_federation'),
+	));
+	SimpleSAML_Module::callHooks('portalextras', $pagesets);
+	$portal = new sspmod_portal_Portal($allLinks, $pagesets);
 	
 	if (!$portal->isPortalized($hookinfo['page'])) return;
 
-- 
GitLab