cvs: smarty / NEWS /libs/core core.process_cached_inserts.php

"Messju Mohr" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmessju1068590773@cvsserver>
messju		Tue Nov 11 17:46:13 2003 EDT

  Modified files:              
    /smarty	NEWS 
    /smarty/libs/core	core.process_cached_inserts.php 
  Log:
  fix handling of assign inside {insert}-tags
  
  
Index: smarty/NEWS
diff -u smarty/NEWS:1.400 smarty/NEWS:1.401
--- smarty/NEWS:1.400	Wed Nov  5 04:21:23 2003
+++ smarty/NEWS	Tue Nov 11 17:46:12 2003
@@ -1,3 +1,4 @@
+  - fix handling of assign inside {insert}-tags (messju)
   - fix handling if [...] inside triple-quotes in config-files (messju)
   - fix handling of simple-math-operators inside modifiers (Dominik, messju)
   - fix handling of trailing-slashes in open_basedir in
Index: smarty/libs/core/core.process_cached_inserts.php
diff -u smarty/libs/core/core.process_cached_inserts.php:1.6 smarty/libs/core/core.process_cached_inserts.php:1.7
--- smarty/libs/core/core.process_cached_inserts.php:1.6	Sat Oct 11 04:55:53 2003
+++ smarty/libs/core/core.process_cached_inserts.php	Tue Nov 11 17:46:13 2003
@@ -45,7 +45,12 @@
         }
 
         $function_name = $smarty->_plugins['insert'][$name][0];
-        $replace = $function_name($args, $smarty);
+        if (empty($args['assign'])) {
+            $replace = $function_name($args, $smarty);
+        } else {
+            $smarty->assign($args['assign'], $function_name($args, $smarty));
+            $replace = '';
+        }
 
         $params['results'] = str_replace($cached_inserts[$i], $replace, $params['results']);
         if ($smarty->debugging) {

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.