summaryrefslogtreecommitdiffstats
path: root/lib/SimpleSAML
diff options
context:
space:
mode:
authorHanne Moa <hanne.moa@uninett.no>2016-02-26 15:07:49 +0100
committerHanne Moa <hanne.moa@uninett.no>2016-02-26 15:07:49 +0100
commit2605d6a1c46de67e2ebcefe7bd4010b2a8512a49 (patch)
tree7935a35764b6ea7d569ee2f8410bf5866d756279 /lib/SimpleSAML
parent4cdc6956bdc40e4cc37288c47e6ce11e137937e1 (diff)
downloadsimplesamlphp-2605d6a1c46de67e2ebcefe7bd4010b2a8512a49.zip
simplesamlphp-2605d6a1c46de67e2ebcefe7bd4010b2a8512a49.tar.gz
simplesamlphp-2605d6a1c46de67e2ebcefe7bd4010b2a8512a49.tar.bz2
Okay... too much Friday
Diffstat (limited to 'lib/SimpleSAML')
-rw-r--r--lib/SimpleSAML/XHTML/Template.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php
index fabaf15..222ce90 100644
--- a/lib/SimpleSAML/XHTML/Template.php
+++ b/lib/SimpleSAML/XHTML/Template.php
@@ -59,7 +59,14 @@ class SimpleSAML_XHTML_Template
*/
private function setupTwig()
{
- $twig_filename = basename($this->template, '.php').'.twig.html';
+ $namespace = '';
+ $filename = $this->template;
+ $colonpos = strpos($this->template, ':');
+ if ($colonpos === true) {
+ $filename = substr($this->template, $colonpos);
+ $namespace = substr($this->template, 0, $colonpos);
+ }
+ $twig_filename = basename($filename, '.php').'.twig.html';
$filename = $this->findTemplatePath($twig_filename, $throw_exception=false);
// twig not in use for this page
if (is_null($filename)) {
@@ -70,7 +77,7 @@ class SimpleSAML_XHTML_Template
$this->template = $twig_filename;
$loader = new \Twig_Loader_Filesystem(array(dirname($filename), $this->configuration->resolvePath('templates')));
$auto_reload = true; // TODO: set this in config
- $this->twig = new \Twig_Environment($loader, array('cache' => $cache, 'dauto_reload' => $auto_reload));
+ $this->twig = new \Twig_Environment($loader, array('cache' => $cache, 'auto_reload' => $auto_reload));
return true;
}