[ Mini Kiebo ]
Server: Windows NT DESKTOP-5B8S0D4 6.2 build 9200 (Windows 8 Professional Edition) i586
Path:
D:
/
Backup
/
14082024
/
Data
/
htdocs
/
htdocs
/
ojs
/
248
/
lib
/
pkp
/
lib
/
smarty
/
diff
/
[
Home
]
File: Smarty.class.php.diff
--- Smarty-2.6.12/libs/Smarty.class.php 2006-01-18 10:52:24.000000000 -0800 +++ smarty/Smarty.class.php 2006-01-23 15:07:45.000000000 -0800 @@ -1107,6 +1107,18 @@ { $this->fetch($resource_name, $cache_id, $compile_id, true); } + + /** + * compiles a template without executing it + * + * @param string $resource_name + * @param string $cache_id + * @param string $compile_id + */ + function compile($resource_name, $cache_id = null, $compile_id = null) + { + $this->fetch($resource_name, $cache_id, $compile_id, false, false); + } /** * executes & returns or displays the template results @@ -1116,7 +1128,7 @@ * @param string $compile_id * @param boolean $display */ - function fetch($resource_name, $cache_id = null, $compile_id = null, $display = false) + function fetch($resource_name, $cache_id = null, $compile_id = null, $display = false, $execute = true) { static $_cache_info = array(); @@ -1262,7 +1274,7 @@ if ($this->_is_compiled($resource_name, $_smarty_compile_path) || $this->_compile_resource($resource_name, $_smarty_compile_path)) { - include($_smarty_compile_path); + if ($execute) { include($_smarty_compile_path); } } $_smarty_results = ob_get_contents(); ob_end_clean();