Skip to content
Snippets Groups Projects
Commit e8ee839e authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Allowing overriding headers and footers

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@499 44740490-163a-0410-bde0-09ae8108e29a
parent b1e6604f
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,6 @@ class SimpleSAML_XHTML_Template { ...@@ -24,7 +24,6 @@ class SimpleSAML_XHTML_Template {
private $language = null; private $language = null;
private $langtext = null; private $langtext = null;
private $usebasetheme = false;
public $data = null; public $data = null;
...@@ -136,17 +135,7 @@ class SimpleSAML_XHTML_Template { ...@@ -136,17 +135,7 @@ class SimpleSAML_XHTML_Template {
$data = $this->data; $data = $this->data;
$filename = $this->configuration->getPathValue('templatedir') . $this->configuration->getValue('theme.use') . '/' . $file; $filename = $this->configuration->getPathValue('templatedir') . $this->configuration->getValue('theme.use') . '/' . $file;
if ($this->usebasetheme) { if (!file_exists($filename)) {
SimpleSAML_Logger::error($_SERVER['PHP_SELF'].' - Template: Using base for inclusion');
$filename = $this->configuration->getPathValue('templatedir') . $this->configuration->getValue('theme.base') . '/' . $file;
if (!file_exists($filename)) {
SimpleSAML_Logger::error($_SERVER['PHP_SELF'].' - Template: Could not find template file [' . $file .
'] at [' . $filename . ']');
throw new Exception('Could not load template file [' . $file . ']');
}
} elseif (!file_exists($filename)) {
SimpleSAML_Logger::error($_SERVER['PHP_SELF'].' - Template: Could not find template file [' . $file . SimpleSAML_Logger::error($_SERVER['PHP_SELF'].' - Template: Could not find template file [' . $file .
'] at [' . $filename . '] - Now trying at base'); '] at [' . $filename . '] - Now trying at base');
...@@ -271,7 +260,6 @@ class SimpleSAML_XHTML_Template { ...@@ -271,7 +260,6 @@ class SimpleSAML_XHTML_Template {
if (!file_exists($filename)) { if (!file_exists($filename)) {
SimpleSAML_Logger::warning($_SERVER['PHP_SELF'].' - Template: Could not find template file [' . $this->template . '] at [' . $filename . '] - now trying the base template'); SimpleSAML_Logger::warning($_SERVER['PHP_SELF'].' - Template: Could not find template file [' . $this->template . '] at [' . $filename . '] - now trying the base template');
$this->usebasetheme = true;
$filename = $this->configuration->getPathValue('templatedir') . $filename = $this->configuration->getPathValue('templatedir') .
$this->configuration->getValue('theme.base') . '/' . $this->template; $this->configuration->getValue('theme.base') . '/' . $this->template;
......
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