mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
- update code generated by template function call handler
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
- speed and size optimizations
|
- speed and size optimizations
|
||||||
- bugfix under HHVM temporary cache file must only be created when caches template was updated
|
- bugfix under HHVM temporary cache file must only be created when caches template was updated
|
||||||
- fix compiled code for new {block} assign attribute
|
- fix compiled code for new {block} assign attribute
|
||||||
|
- update code generated by template function call handler
|
||||||
|
|
||||||
18.09.2015
|
18.09.2015
|
||||||
- bugfix {if $foo instanceof $bar} failed to compile if 2nd value is a variable https://github.com/smarty-php/smarty/issues/92
|
- bugfix {if $foo instanceof $bar} failed to compile if 2nd value is a variable https://github.com/smarty-php/smarty/issues/92
|
||||||
|
@@ -119,7 +119,7 @@ class Smarty extends Smarty_Internal_TemplateBase
|
|||||||
/**
|
/**
|
||||||
* smarty version
|
* smarty version
|
||||||
*/
|
*/
|
||||||
const SMARTY_VERSION = '3.1.28-dev/65';
|
const SMARTY_VERSION = '3.1.28-dev/66';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* define variable scopes
|
* define variable scopes
|
||||||
|
@@ -53,10 +53,12 @@ class Smarty_Internal_Function_Call_Handler
|
|||||||
$content = $cache->read($tplPtr);
|
$content = $cache->read($tplPtr);
|
||||||
if ($content) {
|
if ($content) {
|
||||||
// check if we must update file dependency
|
// check if we must update file dependency
|
||||||
if (!preg_match("/'{$funcParam['uid']}'([\S\s]*?)'nocache_hash'/", $content, $match2)) {
|
if (!preg_match("/'{$funcParam['uid']}'(.*?)'nocache_hash'/", $content, $match2)) {
|
||||||
$content = preg_replace("/('file_dependency'([\S\s]*?)\()/", "\\1{$match1[0]}", $content);
|
$content = preg_replace("/('file_dependency'(.*?)\()/", "\\1{$match1[0]}", $content);
|
||||||
}
|
}
|
||||||
$cache->write($tplPtr, $content . "<?php " . $match[0] . "?>\n");
|
$cache->write($tplPtr, preg_replace('/\s*\?>\s*$/', "\n", $content) . "\n" .
|
||||||
|
preg_replace(array('/^\s*<\?php\s+/', '/\s*\?>\s*$/'), "\n",
|
||||||
|
$match[0]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user