cvs: php4 /pear/HTML ITX.php

From: Date: Wed, 07 Nov 2001 15:39:17 +0000
Subject: cvs: php4 /pear/HTML ITX.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-1279@lists.php.net to get a copy of this message
mj Wed Nov 7 10:39:17 2001 EDT Modified files: /php4/pear/HTML ITX.php Log: * Patch by Dietrich Ayala <dietrich@ganx4.com> Index: php4/pear/HTML/ITX.php diff -u php4/pear/HTML/ITX.php:1.7 php4/pear/HTML/ITX.php:1.8 --- php4/pear/HTML/ITX.php:1.7 Mon Nov 5 02:25:24 2001 +++ php4/pear/HTML/ITX.php Wed Nov 7 10:39:16 2001 @@ -16,7 +16,7 @@ // | Authors: Ulf Wendel <ulf.wendel@phpdoc.de> | // +----------------------------------------------------------------------+ // -// $Id: ITX.php,v 1.7 2001/11/05 07:25:24 mj Exp $ +// $Id: ITX.php,v 1.8 2001/11/07 15:39:16 mj Exp $ // require_once "HTML/IT.php"; @@ -35,7 +35,7 @@ * * @author Ulf Wendel <uw@netuse.de> * @access public -* @version $Id: ITX.php,v 1.7 2001/11/05 07:25:24 mj Exp $ +* @version $Id: ITX.php,v 1.8 2001/11/07 15:39:16 mj Exp $ * @package IT[X] */ class IntegratedTemplateExtension extends IntegratedTemplate { @@ -257,10 +257,16 @@ $this->openingDelimiter."__".$blockname."__".$this->closingDelimiter, $this->blocklist[$parents[0]] ); - + $this->deleteFromBlockvariablelist($parents[0], $placeholder); $this->updateBlockvariablelist($blockname); - + // check if any inner blocks were found + if(is_array($this->blockinner[$blockname]) and count($this->blockinner[$blockname]) > 0){ + // loop through inner blocks, registering the variable placeholders in each + foreach($this->blockinner[$blockname] as $childBlock){ + $this->updateBlockvariablelist($childBlock); + } + } return true; } // end func addBlock @@ -597,10 +603,15 @@ function updateBlockvariablelist($block) { preg_match_all( $this->variablesRegExp, $this->blocklist[$block], $regs ); - while (list($k,$varname) = each($regs[1])) { - $this->blockvariables[$block][$varname] = true; - } + + if (0 != count($regs[1])) { + foreach ($regs[1] as $k => $var) { + $this->blockvariables[$block][$var] = true; + } + } else { + $this->blockvariables[$block] = array(); + } } // end func updateBlockvariablelist /**

« previous php.pear.cvs (#1279) next »