From 3560c1dee20f63f7b189768a279c56492eecb176 Mon Sep 17 00:00:00 2001 From: bshuttle Date: Thu, 8 Dec 2005 14:30:47 +0000 Subject: [PATCH] need an absoluteRootUrl for the notification email templates. --- lib/templating/smartytemplate.inc.php | 10 ++++++++++ 1 file changed, 10 insertions(+), 0 deletions(-) diff --git a/lib/templating/smartytemplate.inc.php b/lib/templating/smartytemplate.inc.php index 4e69473..f9ee814 100644 --- a/lib/templating/smartytemplate.inc.php +++ b/lib/templating/smartytemplate.inc.php @@ -58,8 +58,18 @@ class KTSmartyTemplate extends KTTemplate { } } $KTConfig =& KTConfig::getSingleton(); + + // needed for a very, very few places. + $isSSL = $KTConfig->get("KnowledgeTree/sslEnabled"); + $hostname = $KTConfig->get("KnowledgeTree/serverName"); + $absroot = 'http'; + $absroot .= ($isSSL) ? 's://' : '://'; + $absroot .= $hostname; + $absroot .= $KTConfig->get("KnowledgeTree/rootUrl"); + $smarty->assign("config", $KTConfig); $smarty->assign("rootUrl", $KTConfig->get("KnowledgeTree/rootUrl")); + $smarty->assign("absoluteRootUrl", $absroot); $smarty->caching = false; $smarty->register_function('entity_select', array('KTSmartyTemplate', 'entity_select')); $smarty->register_function('boolean_checkbox', array('KTSmartyTemplate', 'boolean_checkbox')); -- libgit2 0.21.4