diff options
author | Kevin Chabowski <kevin@kch42.de> | 2011-09-24 13:25:28 +0200 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2011-09-24 13:25:28 +0200 |
commit | 6d8163041ced4f917330472675d2d8ffd2123db9 (patch) | |
tree | 546543ba9b0ea6d4c66b8ec3b83b2de978b46ad4 /stupid_template_engine.php | |
parent | 1619126d7d87538082dd58645a37f528adb1deeb (diff) | |
download | ste-6d8163041ced4f917330472675d2d8ffd2123db9.tar.gz ste-6d8163041ced4f917330472675d2d8ffd2123db9.tar.bz2 ste-6d8163041ced4f917330472675d2d8ffd2123db9.zip |
Fixed bug in relative template path construction.
Template "b" was not found, if "a" <ste:load>-ed it and both were in the
same, non-root directory. Now fixed.
Diffstat (limited to 'stupid_template_engine.php')
-rw-r--r-- | stupid_template_engine.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stupid_template_engine.php b/stupid_template_engine.php index d88adb4..e84bf67 100644 --- a/stupid_template_engine.php +++ b/stupid_template_engine.php @@ -1091,7 +1091,7 @@ class STECore $tpl = str_replace("\\", "/", $tpl); if($tpl[0] != "/") $tpl = $this->cur_tpl_dir . "/" . $tpl; - $pathex = array_filter(array_slice(explode("/", $tpl), 1), function($s) { return ($s != ".") and (!empty($s)); }); + $pathex = array_filter(explode("/", $tpl), function($s) { return ($s != ".") and (!empty($s)); }); $pathex = array_merge($pathex); while(($i = array_search("..", $pathex)) !== False) { |