From 0b41816fa3075436d8fd71af7b57c15469bec6e4 Mon Sep 17 00:00:00 2001 From: sam159 Date: Mon, 2 Jun 2014 21:38:17 +0100 Subject: [PATCH] Update Template.php Fix for use on windows. Hard coded slash was causing problems with the compiled name. --- Template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Template.php b/Template.php index 26f0291..b57d254 100644 --- a/Template.php +++ b/Template.php @@ -48,7 +48,7 @@ class Template if (DIR_TEMPLATES_COMPILED == false) { return false; } - $tFileSafe = preg_replace(array('%^'.preg_quote(DIR_TEMPLATES).'/%','/[^a-z0-9_\.]/i'), array('','_'), $tFile); + $tFileSafe = preg_replace(array('%^'.preg_quote(DIR_TEMPLATES.DIRECTORY_SEPARATOR,'%').'%','/[^a-z0-9_\.]/i'), array('','_'), $tFile); return DIR_TEMPLATES_COMPILED.DS.$tFileSafe.'-'.md5($tFile).'.template.php'; } private function GetCompiled($tFile) { @@ -134,4 +134,4 @@ class Template return $this->sections[$name]; return ''; } -} \ No newline at end of file +}