Update Template.php
Fix for use on windows. Hard coded slash was causing problems with the compiled name.
This commit is contained in:
@@ -48,7 +48,7 @@ class Template
|
|||||||
if (DIR_TEMPLATES_COMPILED == false) {
|
if (DIR_TEMPLATES_COMPILED == false) {
|
||||||
return 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';
|
return DIR_TEMPLATES_COMPILED.DS.$tFileSafe.'-'.md5($tFile).'.template.php';
|
||||||
}
|
}
|
||||||
private function GetCompiled($tFile) {
|
private function GetCompiled($tFile) {
|
||||||
@@ -134,4 +134,4 @@ class Template
|
|||||||
return $this->sections[$name];
|
return $this->sections[$name];
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user