mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
- bugfix allow windows network filepath or wrapper (forum topic 25876) https://github.com/smarty-php/smarty/issues/170
This commit is contained in:
@@ -1,4 +1,7 @@
|
|||||||
===== 3.1.30-dev ===== (xx.xx.xx)
|
===== 3.1.30-dev ===== (xx.xx.xx)
|
||||||
|
28.01.2016
|
||||||
|
- bugfix allow windows network filepath or wrapper (forum topic 25876) https://github.com/smarty-php/smarty/issues/170
|
||||||
|
|
||||||
27.01.2016
|
27.01.2016
|
||||||
- revert bugfix compiling {section} did create warning
|
- revert bugfix compiling {section} did create warning
|
||||||
- bugfix {$smarty.section.customer.loop} did throw compiler error https://github.com/smarty-php/smarty/issues/161
|
- bugfix {$smarty.section.customer.loop} did throw compiler error https://github.com/smarty-php/smarty/issues/161
|
||||||
|
@@ -121,7 +121,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
/**
|
/**
|
||||||
* smarty version
|
* smarty version
|
||||||
*/
|
*/
|
||||||
const SMARTY_VERSION = '3.1.30-dev/25';
|
const SMARTY_VERSION = '3.1.30-dev/27';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* define variable scopes
|
* define variable scopes
|
||||||
@@ -1144,10 +1144,12 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
if (strpos($path, $nds) !== false) {
|
if (strpos($path, $nds) !== false) {
|
||||||
$path = str_replace($nds, DS, $path);
|
$path = str_replace($nds, DS, $path);
|
||||||
}
|
}
|
||||||
if (DS != '/' && $path[ 0 ] == DS) {
|
preg_match('%^(?<root>(?:[[:alpha:]]:[\\\\]|/|[\\\\]{2}[[:alpha:]]+|[[:print:]]{2,}:[/]{2}|[\\\\])?)(?<path>(?:[[:print:]]*))$%', $path, $parts);
|
||||||
$path = substr(getcwd(), 0, 2) . $path;
|
$path = $parts['path'];
|
||||||
|
if ($parts['root'] == '\\') {
|
||||||
|
$parts['root'] = substr(getcwd(), 0, 2) . $parts['root'];
|
||||||
} else {
|
} else {
|
||||||
if ($realpath !== null && $path[ 0 ] != '/' && $path[ 1 ] != ':') {
|
if ($realpath !== null && !$parts['root']) {
|
||||||
$path = getcwd() . DS . $path;
|
$path = getcwd() . DS . $path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1157,10 +1159,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
preg_replace('#([\\\\/][^\\\\/]+[\\\\/]([.]?[\\\\/])*[.][.][\\\\/]([.]?[\\\\/])*)+|([\\\\/]([.]?[\\\\/])+)#',
|
preg_replace('#([\\\\/][^\\\\/]+[\\\\/]([.]?[\\\\/])*[.][.][\\\\/]([.]?[\\\\/])*)+|([\\\\/]([.]?[\\\\/])+)#',
|
||||||
DS, $path, - 1, $count);
|
DS, $path, - 1, $count);
|
||||||
}
|
}
|
||||||
if ($realpath === false && ($path[ 0 ] == '/' || $path[ 1 ] == ':')) {
|
return $parts['root'] . $path;
|
||||||
$path = str_ireplace(getcwd(), '.', $path);
|
|
||||||
}
|
|
||||||
return $path;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user