[Patch] HTML_Template_PHPLIB - Bugfix and performance/code optimizations

From: Date: Sun, 12 Feb 2006 18:29:53 +0000
Subject: [Patch] HTML_Template_PHPLIB - Bugfix and performance/code optimizations
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-41320@lists.php.net to get a copy of this message
This patch fixes the following bug [PEAR-BUG] Bug #6759: Wrong replacement order of variables during parse() and adds some more performance optimizations and some more code robustness. In detail the following has been changed: - My editor removed some useless end of line whitespaces - "" have been replaced with '' whereever possible - this is faster in processing - this is know since some years - Added {} to if statements that don't have them for more code robustness against future enhancements - Changed the signature of function setUnknowns($unknowns = "keep") to function setUnknowns($unknowns = 'remove') to be conform with the constructor (both should have the same default values. - Added method function unsetVar($varname) Unset corresponding substitutions for placeholders This is very useful in some situations with recursive block handling - Bugfixed and optimized subst() method as described in Bug #6759 Attention an older code version that still has the bug (in a lightly different way) is still there commented out The idea of the fix is to loop backward through the replacements and only replace the variables that are within the page and not that from the possible also replaced blocks. - Added case 'keep': default: ; to the finish() method for more code robustness and future enhancements Greetings PowerStat (Kai Hofmann) ______________________________________________________________________ XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club! Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130

« previous php.pear.dev (#41320) next »