summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAtsushi Matsuo <famlog@gmail.com>2024-08-29 06:09:34 +0900
committerGitHub <noreply@github.com>2024-08-28 23:09:34 +0200
commit30c6ee64ab80154539c25ff8b8285aa5d568babf (patch)
treea4ac1be855b517041bdcd490e2edb1cc56e738b5 /src
parentfd90f7eac969d998736edbf12dadf04c64471b0a (diff)
downloadsmarty-30c6ee64ab80154539c25ff8b8285aa5d568babf.tar.gz
smarty-30c6ee64ab80154539c25ff8b8285aa5d568babf.tar.bz2
smarty-30c6ee64ab80154539c25ff8b8285aa5d568babf.zip
Fix an issue that preventing the use of "extends:" to define the inheritance tree on Windows (#1056)
Diffstat (limited to 'src')
-rw-r--r--src/Resource/ExtendsPlugin.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Resource/ExtendsPlugin.php b/src/Resource/ExtendsPlugin.php
index acce54e2..0f9c9de2 100644
--- a/src/Resource/ExtendsPlugin.php
+++ b/src/Resource/ExtendsPlugin.php
@@ -93,7 +93,11 @@ class ExtendsPlugin extends BasePlugin
*/
public function getBasename(Source $source)
{
- return str_replace(':', '.', basename($source->getResourceName()));
+ $search = array(':');
+ if (\Smarty\Smarty::$_IS_WINDOWS) {
+ $search = array(':', '|');
+ }
+ return str_replace($search, '.', basename($source->getResourceName()));
}
/*