mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-03 18:04:26 +02:00
- bugfix on Windows absolute filepathes did fail if the drive letter was followed by a linux DIRECTORY_SEPARATOR
like C:/ at Smarty > 3.1.33-dev-5 https://github.com/smarty-php/smarty/issues/451
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
===== 3.1.33-dev-8 =====
|
||||
===== 3.1.33-dev-9 =====
|
||||
31.08.2018
|
||||
- bugfix on Windows absolute filepathes did fail if the drive letter was followed by a linux DIRECTORY_SEPARATOR
|
||||
like C:/ at Smarty > 3.1.33-dev-5 https://github.com/smarty-php/smarty/issues/451
|
||||
|
||||
- PSR-2 code style fixes for config and template file Lexer/Parser generated with
|
||||
the Smarty Lexer/Parser generator from https://github.com/smarty-php/smarty-lexer
|
||||
https://github.com/smarty-php/smarty/pull/483
|
||||
|
@@ -112,7 +112,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
||||
/**
|
||||
* smarty version
|
||||
*/
|
||||
const SMARTY_VERSION = '3.1.33-dev-8';
|
||||
const SMARTY_VERSION = '3.1.33-dev-9';
|
||||
/**
|
||||
* define variable scopes
|
||||
*/
|
||||
@@ -1116,7 +1116,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
||||
{
|
||||
$nds = array('/' => '\\', '\\' => '/');
|
||||
preg_match(
|
||||
'%^(?<root>(?:[[:alpha:]]:[\\\\]|/|[\\\\]{2}[[:alpha:]]+|[[:print:]]{2,}:[/]{2}|[\\\\])?)(?<path>(.*))$%u',
|
||||
'%^(?<root>(?:[[:alpha:]]:[\\\\/]|/|[\\\\]{2}[[:alpha:]]+|[[:print:]]{2,}:[/]{2}|[\\\\])?)(?<path>(.*))$%u',
|
||||
$path,
|
||||
$parts
|
||||
);
|
||||
@@ -1130,6 +1130,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
||||
}
|
||||
// normalize DIRECTORY_SEPARATOR
|
||||
$path = str_replace($nds[DIRECTORY_SEPARATOR], DIRECTORY_SEPARATOR, $path);
|
||||
$parts[ 'root' ] = str_replace($nds[DIRECTORY_SEPARATOR], DIRECTORY_SEPARATOR, $parts[ 'root' ]);
|
||||
do {
|
||||
$path = preg_replace(
|
||||
array('#[\\\\/]{2}#', '#[\\\\/][.][\\\\/]#', '#[\\\\/]([^\\\\/.]+)[\\\\/][.][.][\\\\/]#'),
|
||||
|
Reference in New Issue
Block a user