mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
- optimization of template/config file normalization
This commit is contained in:
@@ -36,7 +36,7 @@ class Smarty_Internal_Resource_File extends Smarty_Resource
|
||||
protected function buildFilepath(Smarty_Template_Source $source, Smarty_Internal_Template $_template = null)
|
||||
{
|
||||
$file = $source->name;
|
||||
$this->invDS = (DS == '/') ? '\\' : '/';
|
||||
$this->invDS = (DS == '/') ? '\\\\' : '\\/';
|
||||
preg_match('#(^(?P<absolute>[\\\/]|[a-zA-Z]:[\\\/])|(\[(?P<index>[^\]]+)\])|(?P<rel>\.[\\\/]))|((?P<rel2>\.[\\\/])|(?P<ds>[' . $this->invDS . ']))#', $file, $fileMatch);
|
||||
// save basename
|
||||
if (!empty($fileMatch['absolute'])) {
|
||||
|
Reference in New Issue
Block a user