phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpgwapi/inc class.xmltool.inc.php


From: Dave Hall
Subject: [Phpgroupware-cvs] phpgwapi/inc class.xmltool.inc.php
Date: Wed, 30 Aug 2006 12:21:17 +0000

CVSROOT:        /cvsroot/phpgwapi
Module name:    phpgwapi
Changes by:     Dave Hall <skwashd>     06/08/30 12:21:17

Modified files:
        inc            : class.xmltool.inc.php 

Log message:
        support objects better

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.xmltool.inc.php?cvsroot=phpgwapi&r1=1.15&r2=1.16

Patches:
Index: class.xmltool.inc.php
===================================================================
RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.xmltool.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- class.xmltool.inc.php       6 Aug 2006 04:51:26 -0000       1.15
+++ class.xmltool.inc.php       30 Aug 2006 12:21:17 -0000      1.16
@@ -8,7 +8,7 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package phpgwapi
        * @subpackage xml
-       * @version $Id: class.xmltool.inc.php,v 1.15 2006/08/06 04:51:26 
skwashd Exp $
+       * @version $Id: class.xmltool.inc.php,v 1.16 2006/08/30 12:21:17 
skwashd Exp $
        */
 
        /**
@@ -251,6 +251,11 @@
                                                                
$node->add_node($subnode);
                                                                break;
                                                        case 'array':
+                                                       case 'object':
+                                                               if ( 
is_object($val) )
+                                                               {
+                                                                       $val = 
get_object_vars($val);
+                                                               }
                                                                
list($first_key) = each($val); reset($val);
                                                                if($new_index 
&& is_int($first_key))
                                                                {
@@ -265,11 +270,13 @@
                                                                        
$node->add_node($subnode);
                                                                }
                                                                break;
+                                                       /* This is no longer 
needed as we convert object properties to an array above
                                                        case 'object':
                                                                $subnode = new 
xmltool('node', $nextkey,$this->indentstring);
                                                                
$subnode->set_value('PHP_SERIALIZED_OBJECT&:'.serialize($val));
                                                                
$node->add_node($subnode);
                                                                break;
+                                                       */
                                                        case 'resource':
                                                                echo 'Halt: 
Cannot package PHP resource pointers into XML<br>';
                                                                exit;




reply via email to

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