Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26693
Modified Files:
Tag: branch-smarty
serendipity_functions.inc.php
Log Message:
- Use $smarty->fetch() to handle echoing output, thereby improving caching and debug possibilities
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.419.2.8
retrieving revision 1.419.2.9
diff -u -d -r1.419.2.8 -r1.419.2.9
--- serendipity_functions.inc.php 10 Sep 2004 15:48:28 -0000 1.419.2.8
+++ serendipity_functions.inc.php 10 Sep 2004 17:39:19 -0000 1.419.2.9
@@ -3406,16 +3406,11 @@
}
}
-function serendipity_smarty_fetch($block, $file, $echoRaw=false) {
+function serendipity_smarty_fetch($block, $file, $echo = false) {
global $serendipity;
- $output = $serendipity['smarty']->fetch('file:'. serendipity_getTemplateFile($file, 'serendipityPath'), null);
+ $output = $serendipity['smarty']->fetch('file:'. serendipity_getTemplateFile($file, 'serendipityPath'), null, null, ($echo === true && $serendipity['smarty_raw_mode']));
$serendipity['smarty']->assign($block, $output);
-
- /* If we are not using Smarty support, we need to just echo the result of the compile */
- if ( $echoRaw === true && $serendipity['smarty_raw_mode']) {
- echo $output;
- }
}
function serendipity_emptyPrefix($string, $prefix = ': ') {
|