summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Tews <uwe.tews@googlemail.com>2015-06-21 13:53:52 +0200
committerUwe Tews <uwe.tews@googlemail.com>2015-06-21 13:53:52 +0200
commitb64d5d26c90bb525537d8fdd1f81da8b274fa2ec (patch)
treebdf9cb1e03ac88ce8af5dddd9bc89ea32009c57a
parent666f7264f426c92fb6f78d53eeddf8dc4c1ff127 (diff)
downloadsmarty-b64d5d26c90bb525537d8fdd1f81da8b274fa2ec.tar.gz
smarty-b64d5d26c90bb525537d8fdd1f81da8b274fa2ec.tar.bz2
smarty-b64d5d26c90bb525537d8fdd1f81da8b274fa2ec.zip
- update realpath handling
-rw-r--r--change_log.txt1
-rw-r--r--libs/Smarty.class.php2
-rw-r--r--libs/sysplugins/smarty_internal_cacheresource_file.php2
-rw-r--r--libs/sysplugins/smarty_internal_compile_block.php4
-rw-r--r--libs/sysplugins/smarty_internal_resource_extends.php2
5 files changed, 6 insertions, 5 deletions
diff --git a/change_log.txt b/change_log.txt
index 2c478764..05ddedce 100644
--- a/change_log.txt
+++ b/change_log.txt
@@ -4,6 +4,7 @@
- optimization of directory handling / build realpath
- optimization of filter execution
- move registerObject / registerClass into extension
+ - update realpath handling
19.06.2015
- improvement allow closures as callback at $smarty->registerFilter() https://github.com/smarty-php/smarty/issues/59
diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php
index dd6c5ac8..437b4704 100644
--- a/libs/Smarty.class.php
+++ b/libs/Smarty.class.php
@@ -111,7 +111,7 @@ class Smarty extends Smarty_Internal_TemplateBase
/**
* smarty version
*/
- const SMARTY_VERSION = '3.1.28-dev/5';
+ const SMARTY_VERSION = '3.1.28-dev/6';
/**
* define variable scopes
diff --git a/libs/sysplugins/smarty_internal_cacheresource_file.php b/libs/sysplugins/smarty_internal_cacheresource_file.php
index de794517..0792fbe3 100644
--- a/libs/sysplugins/smarty_internal_cacheresource_file.php
+++ b/libs/sysplugins/smarty_internal_cacheresource_file.php
@@ -167,7 +167,7 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource
$_compile_id = isset($compile_id) ? preg_replace('![^\w\|]+!', '_', $compile_id) : null;
$_dir_sep = $smarty->use_sub_dirs ? '/' : '^';
$_compile_id_offset = $smarty->use_sub_dirs ? 3 : 0;
- $_dir = realpath($smarty->getCacheDir()) . '/';
+ $_dir = $smarty->getCacheDir();
if ($_dir == '/') { //We should never want to delete this!
return 0;
}
diff --git a/libs/sysplugins/smarty_internal_compile_block.php b/libs/sysplugins/smarty_internal_compile_block.php
index 93c90a91..cf963832 100644
--- a/libs/sysplugins/smarty_internal_compile_block.php
+++ b/libs/sysplugins/smarty_internal_compile_block.php
@@ -382,13 +382,13 @@ class Smarty_Internal_Compile_Private_Child_Block extends Smarty_Internal_Compil
// update template with original template resource of {block}
if (trim($_attr['type'], "'") == 'file') {
- $compiler->template->template_resource = 'file:' . realpath(trim($_attr['file'], "'"));
+ $compiler->template->template_resource = 'file:' . $compiler->template->smarty->_realpath(trim($_attr['file'], "'"));
} else {
$compiler->template->template_resource = trim($_attr['resource'], "'");
}
// source object
unset ($compiler->template->source);
- $exists = $compiler->template->source->exists;
+ $compiler->template->loadSource();
// must merge includes
if ($_attr['nocache'] == true) {
diff --git a/libs/sysplugins/smarty_internal_resource_extends.php b/libs/sysplugins/smarty_internal_resource_extends.php
index 16974ef2..c6bdc202 100644
--- a/libs/sysplugins/smarty_internal_resource_extends.php
+++ b/libs/sysplugins/smarty_internal_resource_extends.php
@@ -44,7 +44,7 @@ class Smarty_Internal_Resource_Extends extends Smarty_Resource
throw new SmartyException("Resource type {$s->type} cannot be used with the extends resource type");
}
$sources[$s->uid] = $s;
- $uid .= realpath($s->filepath);
+ $uid .= $source->smarty->_realpath($s->filepath);
if ($_template && $_template->smarty->compile_check) {
$exists = $exists && $s->exists;
}