[phpwebapp-commits] CVS: web_app/webobjects/form formWebObj.php,1.5,1.6
Brought to you by:
dashohoxha
From: Dashamir H. <das...@us...> - 2004-07-13 13:18:16
|
Update of /cvsroot/phpwebapp/web_app/webobjects/form In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4377/webobjects/form Modified Files: formWebObj.php Log Message: xml parser Index: formWebObj.php =================================================================== RCS file: /cvsroot/phpwebapp/web_app/webobjects/form/formWebObj.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** formWebObj.php 25 Aug 2003 13:18:29 -0000 1.5 --- formWebObj.php 13 Jul 2004 13:18:08 -0000 1.6 *************** *** 36,40 **** . "src='".$form_url."formWebObj.js'></script>\n"; $webPage->append_to_head($js_code); - //array_unshift($this->content, $js_code); //append js code to the content of this template --- 36,39 ---- *************** *** 50,54 **** </script> "; ! array_push($this->content, $js_code); } } --- 49,53 ---- </script> "; ! $this->contents .= $js_code; } } *************** *** 57,69 **** function get_form_name() { ! for ($i=0; $i < sizeof($this->content); $i++) ! { ! $line = $this->content[$i]; ! if (Parser::get_tag_name($line)=="<form") ! { ! $form_name = Parser::get_attr_value($line, "name"); ! break; ! } ! } return $form_name; } --- 56,62 ---- function get_form_name() { ! $pattern = '/<form[^>]*name=("|\')([^\\1]+)\\1/'; ! preg_match($pattern, $this->contents, $matches); ! $form_name = $matches[2]; return $form_name; } |