Update of /cvsroot/phpwebapp/web_app/parser
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7097/parser
Modified Files:
class.Parser.php class.Render.php
Log Message:
bug fix
Index: class.Parser.php
===================================================================
RCS file: /cvsroot/phpwebapp/web_app/parser/class.Parser.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** class.Parser.php 7 Oct 2004 09:41:43 -0000 1.20
--- class.Parser.php 11 Apr 2005 06:02:47 -0000 1.21
***************
*** 1021,1025 ****
static $tpl_id = "Xmp_001";
$tpl = new Template($tpl_id++, 'XmpTpl');
! $tpl->addVar('attr_list', $this->get_attr_list($attribs));
$this->push_current_tpl($tpl);
}
--- 1021,1025 ----
static $tpl_id = "Xmp_001";
$tpl = new Template($tpl_id++, 'XmpTpl');
! $tpl->attr_list = $this->get_attr_list($attribs);
$this->push_current_tpl($tpl);
}
***************
*** 1035,1039 ****
static $tpl_id = "TextArea_001";
$tpl = new Template($tpl_id++, 'TextAreaTpl');
! $tpl->addVar('attr_list', $this->get_attr_list($attribs));
$this->push_current_tpl($tpl);
}
--- 1035,1039 ----
static $tpl_id = "TextArea_001";
$tpl = new Template($tpl_id++, 'TextAreaTpl');
! $tpl->attr_list = $this->get_attr_list($attribs);
$this->push_current_tpl($tpl);
}
***************
*** 1049,1053 ****
static $tpl_id = "Example_001";
$tpl = new Template($tpl_id++, 'ExampleTpl');
! $tpl->addVar('attr_list', $this->get_attr_list($attribs));
$this->push_current_tpl($tpl);
$this->copy_mode = true;
--- 1049,1053 ----
static $tpl_id = "Example_001";
$tpl = new Template($tpl_id++, 'ExampleTpl');
! $tpl->attr_list = $this->get_attr_list($attribs);
$this->push_current_tpl($tpl);
$this->copy_mode = true;
Index: class.Render.php
===================================================================
RCS file: /cvsroot/phpwebapp/web_app/parser/class.Render.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** class.Render.php 30 Jul 2004 07:00:47 -0000 1.18
--- class.Render.php 11 Apr 2005 06:02:48 -0000 1.19
***************
*** 220,224 ****
function render_ExampleTpl($tpl)
{
! $attr_list = $tpl->vars['attr_list'];
$contents = $tpl->contents;
$this->output("<xmp$attr_list>".$contents."</xmp>");
--- 220,224 ----
function render_ExampleTpl($tpl)
{
! $attr_list = $tpl->attr_list;
$contents = $tpl->contents;
$this->output("<xmp$attr_list>".$contents."</xmp>");
***************
*** 229,233 ****
$tag = substr($tpl->type, 0, -3);
$tag = strtolower($tag);
! $attr_list = $tpl->vars['attr_list'];
$tpl->contents = "<$tag$attr_list>".$tpl->contents."</$tag>";
$this->render_tpl_unindented($tpl);
--- 229,233 ----
$tag = substr($tpl->type, 0, -3);
$tag = strtolower($tag);
! $attr_list = $tpl->attr_list;
$tpl->contents = "<$tag$attr_list>".$tpl->contents."</$tag>";
$this->render_tpl_unindented($tpl);
|