Now you broke "<?php echo time(); ?>{$smarty.now}" in your 3rd commit
(1.390). Patch:
Index: Smarty_Compiler.class.php
===================================================================
RCS file: /repository/smarty/libs/Smarty_Compiler.class.php,v
retrieving revision 1.390
diff -r1.390 Smarty_Compiler.class.php
364a365
> $text_blocks[$i] =
str_replace('<?',$tmp_id,$text_blocks[$i]);
Danilo Buerger schrieb:
I dont think so, my patch is against 1.389 which seems to be the latest
revision of Smarty_Compiler.class.php ... (i am subscribed to the cvs
mailing list as well so i saw your 2nd commit ;-)
Your 2nd commit just fixes the problem when *no* compiled tags are
present, but in my example a compiler tag is present and it still
breaks. Thats what my patch is trying to fix.
Monte Ohrt schrieb:
There is a patch in CVS for this, moments after you got the last
update I presume :)
Danilo Buerger wrote:
Hey list,
Smarty goes berserk when trying to embed php code:
Having php_handling == SMARTY_PHP_PASSTHRU :
--- template ---
{$smarty.now}<?php echo time(); ?>
--- compile ---
<?php echo time(); ?>
<?php echo '<?' ?>
php echo '<?php echo '<?' ?>
php'; ?>
echo time(); <?php echo '<?' ?>
php echo '?>'; ?>
--- expected compile ---
<?php echo time(); ?>
<?php echo '<?php'; ?>
echo time(); <?php echo '?>'; ?>
And when having php_handling == SMARTY_PHP_ALLOW :
--- compile ---
<?php echo time(); ?>
<?php echo '<?' ?>
php echo time(); ?>
--- expected compile ---
<?php echo time(); ?>
<?php echo time(); ?>
Here is the fix:
Index: Smarty_Compiler.class.php
===================================================================
RCS file: /repository/smarty/libs/Smarty_Compiler.class.php,v
retrieving revision 1.389
diff -r1.389 Smarty_Compiler.class.php
357c357
<
---
>
372c372
< $compiled_content .= $text_blocks[$i];
---
> $compiled_content .=
str_replace('<?',$tmp_id,$text_blocks[$i]);
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
|