[phpwebapp-commits] CVS: web_app/parser class.Parser.php,1.6,1.6.2.1 class.Render.php,1.6,1.6.2.1 cl
Brought to you by:
dashohoxha
From: Dashamir H. <das...@us...> - 2004-10-04 09:09:47
|
Update of /cvsroot/phpwebapp/web_app/parser In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5614/parser Modified Files: Tag: phpwebapp-1_0 class.Parser.php class.Render.php class.WebClassTpl.php class.WebObject.php class.WebObjectTpl.php Log Message: All the changes that are done after release 1.0 (but without the XML parser and XHML template requirement) are placed in the branch phpwebapp-1_0, so that old applications can get them, without having to modify their templates. Index: class.Parser.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Parser.php,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** class.Parser.php 25 Aug 2003 13:18:32 -0000 1.6 --- class.Parser.php 4 Oct 2004 09:09:32 -0000 1.6.2.1 *************** *** 662,665 **** --- 662,667 ---- $tpl->params = $webClassTpl->params; $tpl->construct_WebObject($full_obj_name); + ereg("(^ *)", $line, $regs); + $tpl->indentation = $regs[1]; //get the values of the parameter attributes *************** *** 763,767 **** global $webPage, $session; ! //get the attributes 'ID' and 'recs_per_page' $id = Parser::get_attr_value($line, "ID"); --- 765,769 ---- global $webPage, $session; ! //get the attribute 'ID' $id = Parser::get_attr_value($line, "ID"); Index: class.Render.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.Render.php,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** class.Render.php 25 Aug 2003 13:18:32 -0000 1.6 --- class.Render.php 4 Oct 2004 09:09:32 -0000 1.6.2.1 *************** *** 223,228 **** --- 223,235 ---- $wobj_tpl->onRender(); + //increase indentation + $prev_indent = $this->indent; + $this->indent .= $wobj_tpl->indentation; + $this->render_tpl($wobj_tpl); //render it to HTML + //revert to previous indentation + $this->indent = $prev_indent; + $tplVars->popScope(); } Index: class.WebClassTpl.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebClassTpl.php,v retrieving revision 1.7 retrieving revision 1.7.2.1 diff -C2 -d -r1.7 -r1.7.2.1 *** class.WebClassTpl.php 25 Aug 2003 13:18:32 -0000 1.7 --- class.WebClassTpl.php 4 Oct 2004 09:09:32 -0000 1.7.2.1 *************** *** 76,81 **** /** ! * Looks for the PHP file in the same folder as WebClass ! * (with the same name as the webclass' ID) and includes it * if it exists; if not, define a dummy class for this webclass. */ --- 76,81 ---- /** ! * Look for the PHP file in the same folder as WebClass ! * (with the same name as the webclass' ID) and include it * if it exists; if not, define a dummy class for this webclass. */ Index: class.WebObject.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebObject.php,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** class.WebObject.php 25 Aug 2003 13:18:32 -0000 1.6 --- class.WebObject.php 4 Oct 2004 09:09:32 -0000 1.6.2.1 *************** *** 95,99 **** { $sVars = $this->getSVars(); ! if (sizeof($sVars)==0) { //this is the first time that this webobj is --- 95,100 ---- { $sVars = $this->getSVars(); ! if (!isset($sVars['initialized'])) ! //if (sizeof($sVars)==0) { //this is the first time that this webobj is *************** *** 165,169 **** break; default: ! print WebApp::warning_msg("IWebObject::getSVars(): unreckognized \$type '$type'."); case UNDEFINED: $arr_vars = array_merge($session->Vars, $session->dbVars); --- 166,170 ---- break; default: ! print WebApp::warning_msg("WebObject::getSVars(): unreckognized \$type '$type'."); case UNDEFINED: $arr_vars = array_merge($session->Vars, $session->dbVars); Index: class.WebObjectTpl.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/parser/class.WebObjectTpl.php,v retrieving revision 1.6 retrieving revision 1.6.2.1 diff -C2 -d -r1.6 -r1.6.2.1 *** class.WebObjectTpl.php 25 Aug 2003 13:18:32 -0000 1.6 --- class.WebObjectTpl.php 4 Oct 2004 09:09:32 -0000 1.6.2.1 *************** *** 41,44 **** --- 41,46 ---- var $obj_count; + /** Helps to render the template with a good indentation. */ + var $indentation; /** Constructor */ |