cvs: pear /HTML_Template_IT IT.php
| From: | David Soria Parra | Date: | Tue, 18 Sep 2007 01:47:12 +0000 |
| Subject: | cvs: pear /HTML_Template_IT IT.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-48621@lists.php.net to get a copy of this message | ||
dsp Tue Sep 18 01:47:12 2007 UTC
Modified files:
/pear/HTML_Template_IT IT.php
Log:
beautify
http://cvs.php.net/viewvc.cgi/pear/HTML_Template_IT/IT.php?r1=1.24&r2=1.25&diff_format=u
Index: pear/HTML_Template_IT/IT.php
diff -u pear/HTML_Template_IT/IT.php:1.24 pear/HTML_Template_IT/IT.php:1.25
--- pear/HTML_Template_IT/IT.php:1.24 Mon Feb 12 19:55:57 2007
+++ pear/HTML_Template_IT/IT.php Tue Sep 18 01:47:12 2007
@@ -17,7 +17,7 @@
// | David Soria Parra <dsp@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: IT.php,v 1.24 2007/02/12 19:55:57 dsp Exp $
+// $Id: IT.php,v 1.25 2007/09/18 01:47:12 dsp Exp $
//
require_once 'PEAR.php';
@@ -119,7 +119,7 @@
* </code>
*
* @author Ulf Wendel <uw@netuse.de>
- * @version $Id: IT.php,v 1.24 2007/02/12 19:55:57 dsp Exp $
+ * @version $Id: IT.php,v 1.25 2007/09/18 01:47:12 dsp Exp $
* @access public
* @package HTML_Template_IT
*/
@@ -646,14 +646,9 @@
*/
function removeUnknownVariablesFromBlock ($blockname, $blockinner, $variableList) {
if ($this->_options['preserve_input']) {
- if (preg_match_all($this->removeVariablesRegExp, $blockinner,
- $matches, PREG_SET_ORDER)) {
- foreach($matches as $found) {
- list ($withDelimiters, $variableName) = $found;
- if (in_array($variableName, array_keys($this->blockvariables[$blockname]))
- && !in_array($variableName, $variableList)) {
- $blockinner = str_replace($withDelimiters, '', $blockinner);
- }
+ foreach ($this->blockvariables[$blockname] as $var => $setted) {
+ if(!in_array($var, $variableList)) {
+ $blockinner = str_replace($this->openingDelimiter . $var .
$this->closingDelimiter, '', $blockinner);
}
}
} else {