Mailinglisten-Archive |
--------------Boundary-00=_XE4FP50K9VH11GSUDE6E
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
Zum Problem von vorhin: Hiermite könnte es funktionieren ;-)
Gesundheit
Wagner
---------- Forwarded Message ----------
Subject: [PEAR-DEV] ITX bug and patch
Date: Tue, 6 Nov 2001 22:00:38 -0500
From: "Dietrich Ayala" <dietrich_(at)_ganx4.com>
To: <pear-dev_(at)_lists.php.net>
ITX doesn't register the variables of blocks that are inner blocks of a
block created using addBlock() or addBlockfile().
if there are blocks inside blocks created by those methods, an error occurs
upon calling the parse() method.
attached is a patch that adds variable registration functionality for inner
blocks, and adds error checking to the updateBlockvariablelist() method.
thanks,
dietrich
-------------------------------------------------------
--------------Boundary-00=_XE4FP50K9VH11GSUDE6E
Content-Type: text/plain;
charset="iso-8859-1";
name="ITX.diff.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="ITX.diff.txt"
260c260
< =
=20
---
> =20
263c263,269
< =20
---
> // 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);
> }
> }
600,602c606,612
< while (list($k,$varname) =3D each($regs[1])) {
< $this->blockvariables[$block][$varname] =3D true;
< }
---
> =20
> if (0 !=3D count($regs[1])) {
> foreach ($regs[1] as $k =3D> $var) {
> $this->blockvariables[$block][$var] =3D true;
> }
> } else {
> $this->blockvariables[$block] =3D array();
603a614
> }
--------------Boundary-00=_XE4FP50K9VH11GSUDE6E
Content-Type: text/plain;
charset="us-ascii";
name="Attachment: 2"
Content-Transfer-Encoding: 7bit
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, e-mail: pear-dev-unsubscribe_(at)_lists.php.net
For additional commands, e-mail: pear-dev-help_(at)_lists.php.net
To contact the list administrators, e-mail: php-list-admin_(at)_lists.php.net
--------------Boundary-00=_XE4FP50K9VH11GSUDE6E--
php::bar PHP Wiki - Listenarchive