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

From: Date: Wed, 25 May 2005 04:31:30 +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-32113@lists.php.net to get a copy of this message
alan_k Wed May 25 00:31:30 2005 EDT Modified files: /pear/HTML_Template_Flexy/Flexy/Compiler/Flexy Tag.php Log: make error message more sensible http://cvs.php.net/diff.php/pear/HTML_Template_Flexy/Flexy/Compiler/Flexy/Tag.php?r1=1.19&r2=1.20&ty=u Index: pear/HTML_Template_Flexy/Flexy/Compiler/Flexy/Tag.php diff -u pear/HTML_Template_Flexy/Flexy/Compiler/Flexy/Tag.php:1.19 pear/HTML_Template_Flexy/Flexy/Compiler/Flexy/Tag.php:1.20 --- pear/HTML_Template_Flexy/Flexy/Compiler/Flexy/Tag.php:1.19 Fri May 13 23:44:27 2005 +++ pear/HTML_Template_Flexy/Flexy/Compiler/Flexy/Tag.php Wed May 25 00:31:29 2005 @@ -16,7 +16,7 @@ // | Authors: Alan Knowles <alan@akbkhome> | // +----------------------------------------------------------------------+ // -// $Id: Tag.php,v 1.19 2005/05/14 03:44:27 alan_k Exp $ +// $Id: Tag.php,v 1.20 2005/05/25 04:31:29 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.19 2005/05/14 03:44:27 alan_k Exp $ +* @version $Id: Tag.php,v 1.20 2005/05/25 04:31:29 alan_k Exp $ */ class HTML_Template_Flexy_Compiler_Flexy_Tag { @@ -814,6 +814,17 @@ // radio $mergeWithName = false; $id = $this->element->getAttribute('NAME'); + + + if (isset($this->element->ucAttributes['FLEXY:RAW'])) { + return HTML_Template_Flexy::raiseError( + "Error:{$_HTML_TEMPLATE_FLEXY['filename']} on Line {$this->element->line} ". + "in Tag &lt;{$this->element->tag}&gt;:<BR>". + "Flexy:raw can only be used with flexy:ignore, to prevent conversion of html ". + "elements to flexy elements", + null, HTML_TEMPLATE_FLEXY_ERROR_DIE + ); + } // checkboxes need more work.. - at the momemnt assume one with the same value... if (in_array(strtoupper($this->element->getAttribute('TYPE')), array('RADIO'))) { @@ -835,7 +846,7 @@ $id = $this->element->getAttribute('ID'); if (!$id) { return HTML_Template_Flexy::raiseError("Error on Line {$this->element->line} &lt;{$this->element->tag}&gt;: - Radio Input's require an ID tag..", + Radio Input's require an ID attribute (eg &lt;input type='radio' id='1' name='xxxx' value='yyy'&gt;..", null, HTML_TEMPLATE_FLEXY_ERROR_DIE); } $mergeWithName = true;

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