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

Fix for portal module in template header and footer. Footer content is not set...

Fix for portal module in template header and footer. Footer content is not set properly. Resolve problem with missing end divs reported by WAYF...

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1842 44740490-163a-0410-bde0-09ae8108e29a
parent 31b61237
No related branches found
No related tags found
No related merge requests found
<?php
<?php
if(isset($htmlContentPost)) { if(!empty($this->data['htmlinject']['htmlContentPost'])) {
foreach($htmlContentPost AS $c) { foreach($this->data['htmlinject']['htmlContentPost'] AS $c) {
echo $c; echo $c;
} }
} }
?> ?>
......
...@@ -6,14 +6,25 @@ ...@@ -6,14 +6,25 @@
/** /**
* Support the htmlinject hook, which allows modules to change header, pre and post body on all pages. * Support the htmlinject hook, which allows modules to change header, pre and post body on all pages.
*/ */
$htmlContentPre = array(); $htmlContentPost = array(); $htmlContentHead = array(); $this->data['htmlinject'] = array(
'htmlContentPre' => array(),
'htmlContentPost' => array(),
'htmlContentHead' => array(),
);
$jquery = array(); $jquery = array();
if (array_key_exists('jquery', $this->data)) $jquery = $this->data['jquery']; if (array_key_exists('jquery', $this->data)) $jquery = $this->data['jquery'];
if (array_key_exists('pageid', $this->data)) { if (array_key_exists('pageid', $this->data)) {
$hookinfo = array('pre' => &$htmlContentPre, 'post' => &$htmlContentPost, 'head' => &$htmlContentHead, 'jquery' => &$jquery, 'page' => $this->data['pageid']); $hookinfo = array(
'pre' => &$this->data['htmlinject']['htmlContentPre'],
'post' => &$this->data['htmlinject']['htmlContentPost'],
'head' => &$this->data['htmlinject']['htmlContentHead'],
'jquery' => &$jquery,
'page' => $this->data['pageid']
);
SimpleSAML_Module::callHooks('htmlinject', $hookinfo); SimpleSAML_Module::callHooks('htmlinject', $hookinfo);
} }
// - o - o - o - o - o - o - o - o - o - o - o - o - // - o - o - o - o - o - o - o - o - o - o - o - o -
...@@ -68,6 +79,13 @@ if(!empty($jquery)) { ...@@ -68,6 +79,13 @@ if(!empty($jquery)) {
} }
} }
if(!empty($this->data['htmlinject']['htmlContentHead'])) {
foreach($this->data['htmlinject']['htmlContentHead'] AS $c) {
echo $c;
}
}
?> ?>
...@@ -166,8 +184,8 @@ if($onLoad !== '') { ...@@ -166,8 +184,8 @@ if($onLoad !== '') {
<?php <?php
if(isset($htmlContentPre)) { if(!empty($this->data['htmlinject']['htmlContentPre'])) {
foreach($htmlContentPre AS $c) { foreach($this->data['htmlinject']['htmlContentPre'] AS $c) {
echo $c; echo $c;
} }
} }
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