Commit Graph

110 Commits

Author SHA1 Message Date
Uwe Tews
0a3579f9ca restructure template processing
Code was moved into classes it better belongs to.
This does reduce also Smarty's memory footprint
2015-01-02 09:12:01 +01:00
Uwe Tews
80bf76cc6e move internal createTemplateCodeFrame() method into an extension class 2015-01-01 22:59:07 +01:00
Uwe Tews
b013984dfd move properties into classes where they better belong to 2014-12-31 15:44:08 +01:00
Uwe Tews
d3e26fb679 template function call handling 2014-12-30 16:43:42 +01:00
Uwe Tews
6be6bf7b70 limit the template nesting level by security 2014-12-30 12:57:43 +01:00
Uwe Tews
9ecbb93ebb update of the $smarty->merge_compiled_includes option 2014-11-11 00:03:08 +01:00
Uwe Tews
f92af96419 fixed $smarty->debugging on merged compiled subtemplates 2014-11-08 21:02:14 +01:00
Uwe Tews
158b7be58a Debug Console Update
- bugfix Debug Console did not show included subtemplates since 3.1.17
(forum 25301)
- bugfix Modifier debug_print_var did not limit recursion or prevent
recursive object display at Debug Console
(ATTENTION: parameter order has changed to be able to specify maximum
recursion)
- bugfix Debug consol did not include subtemplate information with
$smarty->merge_compiled_includes = true
- improvement The template variables are no longer displayed as objects
on the Debug Console
- improvement $smarty->createData($parent = null, $name = null) new
optional name parameter for display at Debug Console
- addition of some hooks for future extension of Debug Console
2014-11-03 22:27:32 +01:00
Uwe Tews
bc13ebbc9b -bugfix and enhancement on subtemplate {include} and template {function} tags.
* Calling a template which has a nocache section could fail if it was
called from a cached and a not cached subtemplate.
* Calling the same subtemplate cached and not cached with the
$smarty->merge_compiled_includes enabled could cause problems
* Many smaller related changes
2014-11-01 22:42:34 +01:00
Uwe.Tews@googlemail.com
b10b12165a - bugfix calling a new created cache file with fetch() and Smarty::CACHING_LIFETIME_SAVED multiple times did fail (forum 22350) 2014-10-15 20:22:22 +00:00
Uwe.Tews@googlemail.com
425091a19f - fixed spelling, PHPDoc , minor errors, code cleanup 2014-06-06 02:40:04 +00:00
Uwe.Tews@googlemail.com
f06013927c - bugfix Smarty failed when executing PHP on HHVM (Hip Hop 2.4) because uniqid('',true) does return string with ',' (forum topic 20343) 2014-02-17 18:21:31 +00:00
Uwe.Tews@googlemail.com
c3994f4006 .- bugfix relative includes with same name like {include './foo.tpl'} from different folder failed (forum topic 24590)(Issue 161) 2013-10-13 17:49:38 +00:00
Uwe.Tews@googlemail.com
98c1dd29cd - bugfix and enhancement
Because several recent problems with template inheritance the {block} tag compiler has been rewriten
   - Error messages shown now the correct child template file and line number
   - The compiler could fail on some larger UTF-8 text block (forum topic 24455}
   - The {strip} tag can now be placed outside {block} tags in child templates (forum topic 24289}
- change SmartyException::$escape  is now false by default
- change PHP traceback has been remove for SmartyException and SmartyCompilerException
2013-08-24 18:46:31 +00:00
Uwe.Tews@googlemail.com
00ccae8857 - update for PHP 5.4 compatibility
- reformat source to PSR-2 standard
2013-07-14 22:15:45 +00:00
uwe.tews@googlemail.com
bd8af7c5cb - bugfix nocache blocks could be lost when using CACHING_LIFETIME_SAVED (Issue #133) 2013-02-28 19:17:26 +00:00
uwe.tews@googlemail.com
942db98f0c - bugfix the default plugin handler did create wrong compiled code for static class methods
from external script files (issue 108)
2012-07-18 22:31:56 +00:00
uwe.tews@googlemail.com
bc2622bf94 - bugfix recursive {include} within {section} did fail (Smarty developer group) 2012-05-22 21:00:47 +00:00
uwe.tews@googlemail.com
8d60164201 2012-03-30 14:21:16 +00:00
uwe.tews@googlemail.com
820e0e70d8 - bugfix increase entropy of internal function names in compiled and cached template files (Forum Topic 20996) 2012-02-07 18:54:06 +00:00
uwe.tews@googlemail.com
9419a999c9 2012-01-27 19:30:53 +00:00
uwe.tews@googlemail.com
36ec5acb0d - bugfix {capture} tags around recursive {include} calls did throw exception (Forum Topic 20549)
- bugfix $auto_literal = false did not work with { block} tags in child templates (Forum Topic 20581)
- bugfix template inheritance: do not include code of {include} in overloaded {block} into compiled 
   parent template (Issue 66}
- bugfix template inheritance: {$smarty.block.child} in nested child {block} tags did not return expected
   result (Forum Topic 20564)
2011-12-09 22:05:16 +00:00
uwe.tews@googlemail.com
555a7fceb9 - bugfix different behaviour of uniqid() on cygwin. See https://bugs.php.net/bug.php?id=34908
(forum topic 20199)
2011-11-09 15:30:06 +00:00
rodneyrehm
7659c6c0ea - add Smarty::$allow_ambiguous_resources to activate unique resource handling (Forum Topic 20128)
see http://www.smarty.net/forums/viewtopic.php?t=20128
2011-10-21 18:40:16 +00:00
rodneyrehm
6baca38bf1 - improvement sha1() for array keys longer than 150 characters 2011-10-21 12:10:41 +00:00
uwe.tews@googlemail.com
37719ce858 - bugfix apostrophe in plugins_dir path name failed (forum topic 20199) 2011-10-21 12:08:35 +00:00
rodneyrehm
6470e6a2c9 - improvement removed unnecessary sha1()
(and added previously forgotten templates for ClearCompileTests)
2011-10-20 20:28:21 +00:00
rodneyrehm
318328cd75 fixing previous commit 2011-10-14 17:54:25 +00:00
rodneyrehm
59a95253b4 - add Smarty_Internal_Template::clearCache() to accompany isCached() fetch() etc. 2011-10-14 17:15:06 +00:00
rodneyrehm
6979b4efb0 - add concept unique_resource to combat potentially ambiguous template_resource values when custom resource handlers are used (Forum Topic 2012)
http://www.smarty.net/forums/viewtopic.php?t=2012

thereby DRYed and optimized the resource handler identification method.
2011-10-13 13:10:06 +00:00
uwe.tews@googlemail.com
0fabe627ad - add runtime checks for not matching {capture}/{/capture} calls (Forum Topic 20120) 2011-10-11 15:49:19 +00:00
uwe.tews@googlemail.com
12e8593760 - improvement add internal $joined_template_dir property instead computing it on the fly several times 2011-10-03 19:02:44 +00:00
uwe.tews@googlemail.com
bc2d519c38 - bugfix on template functions called nocache calling other template functions 2011-09-28 15:56:01 +00:00
uwe.tews@googlemail.com
d9ba05407a - bugfix wrong resource could be used on compile check of custom resource 2011-09-27 21:48:33 +00:00
uwe.tews@googlemail.com
5c33be7fc0 - bugfix remove race condition when a custom resource did change timestamp during compilation 2011-09-27 17:15:31 +00:00
uwe.tews@googlemail.com
709e5e1e84 - bugfix repeated calls to same subtemplate did not make use of cached template object 2011-09-26 15:21:50 +00:00
uwe.tews@googlemail.com
a98d83bbf3 - improvment better error message for undefined templates at {include} 2011-09-24 18:20:13 +00:00
uwe.tews@googlemail.com
50a8f805dd - remove unused properties
- optimization use real function instead anonymous function for preg_replace_callback
- bugfix a relative {include} in child template blocks failed
- bugfix direct setting of $template_dir, $config_dir, $plugins_dir in __construct() of an 
  extended Smarty class created problems
2011-09-23 20:21:16 +00:00
uwe.tews@googlemail.com
c8eb5d078a - bugfix output filter shall not run on included subtemplates 2011-09-19 21:13:44 +00:00
uwe.tews@googlemail.com
a44d9a6ac9 - bugfix template caching did not care about file.tpl in different template_dir
- bugfix {include $file} was broken when merge_compiled_incluges = true
- bugfix {include} was broken when merge_compiled_incluges = true and same indluded template
  was used in different main templates in one compilation run
2011-09-18 02:31:58 +00:00
monte.ohrt
8842e79107 commit 3.1 into the trunk 2011-09-16 14:19:56 +00:00
uwe.tews@googlemail.com
c4c0cd254c - bugfix experimental getTags() method did not work 2011-07-26 18:09:31 +00:00
uwe.tews@googlemail.com
4d07e3b03e - bugfix do not overwrite 'smarty' template variable when {include ... scope=parent} exits 2011-06-16 17:27:32 +00:00
uwe.tews@googlemail.com
6b0f3a6ede - bugfix on default {function} parameters when {function} was used in nocache sections
- bugfix on compiler object destruction. compiler_object property was by mistake unset.
2011-03-16 23:57:04 +00:00
uwe.tews@googlemail.com
05335415d4 - bugfix "smarty" template variable was not recreated when cached templated had expired 2011-03-03 16:15:31 +00:00
uwe.tews@googlemail.com
e4e5418b46 -fixed typo in exception message of Smarty_Internal_Template 2011-02-16 14:20:23 +00:00
monte.ohrt
f9ce2d8c7e fix typos, rewording 2011-02-11 22:21:17 +00:00
uwe.tews@googlemail.com
d494d0db22 -bugfix of Iterator object handling in internal _count() method 2011-01-16 16:22:58 +00:00
uwe.tews@googlemail.com
7dfb27d322 -bugfix of ArrayAccess object handling in internal _count() method 2011-01-16 15:28:43 +00:00
uwe.tews@googlemail.com
cfd81bafba fix memory leak 2011-01-14 21:51:08 +00:00