[Tutos-commits] CVS: tutos/php/xml xml_parse.pinc,1.15,1.16
Projects / CRM / PLM / Calendar / Tasks / SCRUM / Test / Inventory
Brought to you by:
gokohnert
From: Andreas M. <me...@us...> - 2004-05-26 08:36:34
|
Update of /cvsroot/tutos/tutos/php/xml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6540/php/xml Modified Files: xml_parse.pinc Log Message: Fix: Bug in XML-Import Index: xml_parse.pinc =================================================================== RCS file: /cvsroot/tutos/tutos/php/xml/xml_parse.pinc,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- xml_parse.pinc 26 Mar 2004 18:05:26 -0000 1.15 +++ xml_parse.pinc 26 May 2004 08:36:24 -0000 1.16 @@ -8,9 +8,10 @@ */ include_once('appointment.pinc'); -include_once('group/group.pinc'); -include_once('url/url.pinc'); -include_once('note/note.pinc'); +loadmodule("group"); +loadmodule("url"); +loadmodule("note"); +loadmodule("expense"); class TUTOS_XMLParser extends tutos_module { # var: Deprecated in PHP5 @@ -77,6 +78,11 @@ $this->parentobj = $this->cobj; $this->cobj = &$this->group; } + if ( $name == "expense" ) { + $this->expense = new expense($this->dbconn); + $this->parentobj = $this->cobj; + $this->cobj = &$this->expense; + } $this->ctag = $name; $this->attrs = $attrs; @@ -182,6 +188,19 @@ $this->company = null; $this->groupmemberlist = null; $this->cobj = null; + } else if ( $name == "expense" ) { + if (!$this->testonly) { + $this->expense->msg = $this->expense->save(); + $this->output .= "<expense_set>\n"; + $this->output .= $this->expense->exportXML_start(); + $this->output .= $this->expense->exportXML_body(true); + $this->output .= $this->expense->exportXML_end(); + $this->output .= "</expense_set>\n"; + } else { + $this->output .= "test only:". $this->expense->getFullName() ."\n"; + } + $this->expense = null; + $this->cobj = null; } $this->ctag = end($this->stack); |