cvs: pear /HTML_Template_Flexy/Flexy/Compiler/Flexy Tag.php

From: Date: Wed, 01 Sep 2004 08:32:54 +0000
Subject: cvs: pear /HTML_Template_Flexy/Flexy/Compiler/Flexy Tag.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-23550@lists.php.net to get a copy of this message
alan_k Wed Sep 1 04:32:54 2004 EDT Modified files: /pear/HTML_Template_Flexy/Flexy/Compiler/Flexy Tag.php Log: make forms without names, just render as native html http://cvs.php.net/diff.php/pear/HTML_Template_Flexy/Flexy/Compiler/Flexy/Tag.php?r1=1.7&r2=1.8&ty=u Index: pear/HTML_Template_Flexy/Flexy/Compiler/Flexy/Tag.php diff -u pear/HTML_Template_Flexy/Flexy/Compiler/Flexy/Tag.php:1.7 pear/HTML_Template_Flexy/Flexy/Compiler/Flexy/Tag.php:1.8 --- pear/HTML_Template_Flexy/Flexy/Compiler/Flexy/Tag.php:1.7 Fri Aug 20 22:55:39 2004 +++ pear/HTML_Template_Flexy/Flexy/Compiler/Flexy/Tag.php Wed Sep 1 04:32:52 2004 @@ -16,7 +16,7 @@ // | Authors: Alan Knowles <alan@akbkhome> | // +----------------------------------------------------------------------+ // -// $Id: Tag.php,v 1.7 2004/08/21 02:55:39 alan_k Exp $ +// $Id: Tag.php,v 1.8 2004/09/01 08:32:52 alan_k Exp $ /* FC/BC compatibility with php5 */ if ( (substr(phpversion(),0,1) < 5) && !function_exists('clone')) { eval('function clone($t) { return $t; }'); @@ -31,7 +31,7 @@ * one instance of these exists for each namespace. * * -* @version $Id: Tag.php,v 1.7 2004/08/21 02:55:39 alan_k Exp $ +* @version $Id: Tag.php,v 1.8 2004/09/01 08:32:52 alan_k Exp $ */ class HTML_Template_Flexy_Compiler_Flexy_Tag { @@ -548,6 +548,7 @@ global $_HTML_TEMPLATE_FLEXY; static $tmpId=0; if (!$id) { + return HTML_Template_Flexy::raiseError( "Error:{$_HTML_TEMPLATE_FLEXY['filename']} on Line {$this->element->line} &lt;{$this->element->tag}&gt;: " . " Dynamic tags require an ID value", @@ -800,10 +801,10 @@ $copy = clone($this->element); $copy->children = array(); $id = $this->element->getAttribute('NAME'); - // this is stupid!!! - it doesnt work anyway now.. - //if (!$id) { - // $id = 'form'; - // } + // dont make forms dynamic if they dont have a name.. + if (!$id) { + return false; + } // this adds the element to the elements array. $old = clone($this->element);

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