Skip to content
Snippets Groups Projects
Commit 2605d6a1 authored by Hanne Moa's avatar Hanne Moa
Browse files

Okay... too much Friday

parent 4cdc6956
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment