Commit 3560c1dee20f63f7b189768a279c56492eecb176

Authored by bshuttle
1 parent 558cefe5

need an absoluteRootUrl for the notification email templates.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4390 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/templating/smartytemplate.inc.php
... ... @@ -58,8 +58,18 @@ class KTSmartyTemplate extends KTTemplate {
58 58 }
59 59 }
60 60 $KTConfig =& KTConfig::getSingleton();
  61 +
  62 + // needed for a very, very few places.
  63 + $isSSL = $KTConfig->get("KnowledgeTree/sslEnabled");
  64 + $hostname = $KTConfig->get("KnowledgeTree/serverName");
  65 + $absroot = 'http';
  66 + $absroot .= ($isSSL) ? 's://' : '://';
  67 + $absroot .= $hostname;
  68 + $absroot .= $KTConfig->get("KnowledgeTree/rootUrl");
  69 +
61 70 $smarty->assign("config", $KTConfig);
62 71 $smarty->assign("rootUrl", $KTConfig->get("KnowledgeTree/rootUrl"));
  72 + $smarty->assign("absoluteRootUrl", $absroot);
63 73 $smarty->caching = false;
64 74 $smarty->register_function('entity_select', array('KTSmartyTemplate', 'entity_select'));
65 75 $smarty->register_function('boolean_checkbox', array('KTSmartyTemplate', 'boolean_checkbox'));
... ...