Revision: 1842
Author: andreassolberg
Date: Mon Oct 12 02:25:11 2009
Log: Fix for portal module in template header and footer. Footer content is
not set properly. Resolve problem with missing end divs reported by WAYF...
http://code.google.com/p/simplesamlphp/source/detail?r=1842
Modified:
/trunk/templates/includes/footer.php
/trunk/templates/includes/header.php
=======================================
--- /trunk/templates/includes/footer.php Thu Aug 27 07:05:39 2009
+++ /trunk/templates/includes/footer.php Mon Oct 12 02:25:11 2009
@@ -1,12 +1,14 @@
+<?php
-<?php
-
-if(isset($htmlContentPost)) {
- foreach($htmlContentPost AS $c) {
+
+if(!empty($this->data['htmlinject']['htmlContentPost'])) {
+ foreach($this->data['htmlinject']['htmlContentPost'] AS $c) {
echo $c;
}
}
+
+
?>
=======================================
--- /trunk/templates/includes/header.php Thu Aug 27 07:05:39 2009
+++ /trunk/templates/includes/header.php Mon Oct 12 02:25:11 2009
@@ -6,14 +6,25 @@
/**
* 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();
if (array_key_exists('jquery', $this->data)) $jquery =
$this->data['jquery'];
-
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);
}
// - o - o - o - o - o - o - o - o - o - o - o - o -
@@ -68,6 +79,13 @@
}
}
+if(!empty($this->data['htmlinject']['htmlContentHead'])) {
+ foreach($this->data['htmlinject']['htmlContentHead'] AS $c) {
+ echo $c;
+ }
+}
+
+
?>
@@ -166,8 +184,8 @@
<?php
-if(isset($htmlContentPre)) {
- foreach($htmlContentPre AS $c) {
+if(!empty($this->data['htmlinject']['htmlContentPre'])) {
+ foreach($this->data['htmlinject']['htmlContentPre'] AS $c) {
echo $c;
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"simpleSAMLphp commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/simplesamlphp-commits?hl=en
-~----------~----~----~----~------~----~------~--~---