phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] property/inc class.boifc.inc.php class.XmlToArr...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] property/inc class.boifc.inc.php class.XmlToArr...
Date: Thu, 11 Jan 2007 15:29:53 +0000

CVSROOT:        /sources/phpgroupware
Module name:    property
Changes by:     Sigurd Nes <sigurdne>   07/01/11 15:29:53

Modified files:
        inc            : class.boifc.inc.php class.XmlToArray.inc.php 

Log message:
        

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.boifc.inc.php?cvsroot=phpgroupware&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.XmlToArray.inc.php?cvsroot=phpgroupware&r1=1.2&r2=1.3

Patches:
Index: class.boifc.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.boifc.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- class.boifc.inc.php 10 Jan 2007 15:08:50 -0000      1.3
+++ class.boifc.inc.php 11 Jan 2007 15:29:53 -0000      1.4
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage ifc
-       * @version $Id: class.boifc.inc.php,v 1.3 2007/01/10 15:08:50 sigurdne 
Exp $
+       * @version $Id: class.boifc.inc.php,v 1.4 2007/01/11 15:29:53 sigurdne 
Exp $
        */
 
        /**
@@ -155,6 +155,7 @@
 //                     _debug_array($this->xml_to_array($ifcfile));
 
                        $xa = CreateObject('property.XmlToArray');
+                       $xa->get_attributes = true;
                        $xml = $xa->parseFile($ifcfile);
                        _debug_array($xml);
 

Index: class.XmlToArray.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.XmlToArray.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- class.XmlToArray.inc.php    10 Jan 2007 13:28:45 -0000      1.2
+++ class.XmlToArray.inc.php    11 Jan 2007 15:29:53 -0000      1.3
@@ -8,7 +8,7 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package phpgwapi
        * @subpackage xml
-       * @version $Id: class.XmlToArray.inc.php,v 1.2 2007/01/10 13:28:45 
sigurdne Exp $
+       * @version $Id: class.XmlToArray.inc.php,v 1.3 2007/01/11 15:29:53 
sigurdne Exp $
        * @internal This class originated from: address@hidden AT: 
http://www.devdump.com/phpxml.php
        */
 
@@ -538,17 +538,23 @@
                                                        $tagname = ( 
$this->_lower_case_tags ) ? strtolower($vals[$i]['tag']) : $vals[$i]['tag'];
                                                        if 
(isset($vals[$i]['attributes'])) 
                                                        {
-                                  //    $children[$tagname][]['@'] = 
$vals[$i]['attributes'];
                                                                
if($this->get_attributes)
                                                                {
-                                                                       
$children[$tagname]['@'] = $vals[$i]['attributes'];
+                                                                       
$children[$tagname][]['@'] = $vals[$i]['attributes'];
                                                                        $index 
= count($children[$tagname])-1;
                                                                }
                                                        
                                                                if 
(isset($vals[$i]['value']))
                                                                {
+                                                                       
if($this->get_attributes)
+                                                                       {
+                                                                               
$children[$tagname][] = $this->_onValue( $vals[$i]['value'] );
+                                                                       }
+                                                                       else
+                                                                       {
                                                                        
$children[$tagname] = $this->_onValue( $vals[$i]['value'] );
                                                                }
+                                                               }
                                                                else if( 
$this->_include_empty_values )
                                                                {
                                                                                
$children[$tagname] = '';
@@ -574,6 +580,7 @@
                                                                
if($this->get_attributes)
                                                                {
                                                                        
$children[$tagname][]['@'] = $this->_onAttributes( $vals[$i]['attributes'] );
+                                                               //      $index 
= count($children[$tagname])-1;
                                                                        $index 
= count($children[$vals[$i]['tag']])-1;
                                                                        
$children[$tagname][$index] = array_merge( $children[$tagname][$index] , 
$this->_getChildren($vals, $i) );
                                                                }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]