From d90ad7f4679b2f2e2658a7b4264f2521adedece1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no> Date: Sun, 1 Mar 2009 14:31:56 +0000 Subject: [PATCH] Add portal support for sanitycheck module git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1350 44740490-163a-0410-bde0-09ae8108e29a --- modules/sanitycheck/hooks/hook_frontpage.php | 3 ++- modules/sanitycheck/www/index.php | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/sanitycheck/hooks/hook_frontpage.php b/modules/sanitycheck/hooks/hook_frontpage.php index 8245ae24b..821761910 100644 --- a/modules/sanitycheck/hooks/hook_frontpage.php +++ b/modules/sanitycheck/hooks/hook_frontpage.php @@ -8,9 +8,10 @@ function sanitycheck_hook_frontpage(&$links) { assert('is_array($links)'); assert('array_key_exists("links", $links)'); - $links['links'][] = array( + $links['links']['santitycheck'] = array( 'href' => SimpleSAML_Module::getModuleURL('sanitycheck/index.php'), 'text' => array('en' => 'Sanity check of your simpleSAMLphp setup'), + 'shorttext' => array('en' => 'SanityCheck'), ); } diff --git a/modules/sanitycheck/www/index.php b/modules/sanitycheck/www/index.php index 3446187d4..3f94e0040 100644 --- a/modules/sanitycheck/www/index.php +++ b/modules/sanitycheck/www/index.php @@ -23,8 +23,16 @@ if (isset($_REQUEST['output']) && $_REQUEST['output'] == 'text') { exit; } +$htmlContentPre = array(); $htmlContentPost = array(); $htmlContentHead = array(); $jquery = array(); +$hookinfo = array('pre' => &$htmlContentPre, 'post' => &$htmlContentPost, 'head' => &$htmlContentHead, 'jquery' => &$jquery, 'page' => 'santitycheck'); +SimpleSAML_Module::callHooks('htmlinject', $hookinfo); + $t = new SimpleSAML_XHTML_Template($config, 'sanitycheck:check-tpl.php'); $t->data['errors'] = $errors; $t->data['info'] = $info; +$t->data['htmlContentPre'] = $htmlContentPre; +$t->data['htmlContentPost'] = $htmlContentPost; +$t->data['htmlContentHead'] = $htmlContentHead; +$t->data['jquery'] = $jquery; $t->show(); -- GitLab