fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [15479]


From: nelson . guerra
Subject: [Fmsystem-commits] [15479]
Date: Wed, 17 Aug 2016 01:17:49 +0000 (UTC)

Revision: 15479
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15479
Author:   nelson224
Date:     2016-08-17 01:17:49 +0000 (Wed, 17 Aug 2016)
Log Message:
-----------


Modified Paths:
--------------
    branches/dev-syncromind-2/property/inc/import/import_update_components.php

Modified: 
branches/dev-syncromind-2/property/inc/import/import_update_components.php
===================================================================
--- branches/dev-syncromind-2/property/inc/import/import_update_components.php  
2016-08-17 01:17:33 UTC (rev 15478)
+++ branches/dev-syncromind-2/property/inc/import/import_update_components.php  
2016-08-17 01:17:49 UTC (rev 15479)
@@ -257,33 +257,13 @@
                private function _save_eav( $data, $entity_id, $cat_id )
                {
                        $location_id = (int) 
$GLOBALS['phpgw']->locations->get_id($this->type_app[$this->type], 
".{$this->type}.{$entity_id}.{$cat_id}");
-                       $location_name = 
"_{$this->type}_{$entity_id}_{$cat_id}";
+                       //$location_name = 
"_{$this->type}_{$entity_id}_{$cat_id}";
 
                        $this->db->query("SELECT id as type FROM fm_bim_type 
WHERE location_id = {$location_id}", __LINE__, __FILE__);
                        $this->db->next_record();
                        $type = $this->db->f('type');
                        $id = $this->db->next_id('fm_bim_item', array('type' => 
$type));
 
-                       phpgw::import_class('phpgwapi.xmlhelper');
-                       $xmldata = phpgwapi_xmlhelper::toXML($data, 
$location_name);
-                       $doc = new DOMDocument;
-                       $doc->preserveWhiteSpace = true;
-                       $doc->loadXML($xmldata);
-                       $domElement = 
$doc->getElementsByTagName($location_name)->item(0);
-                       $domAttribute = $doc->createAttribute('appname');
-                       $domAttribute->value = $this->type_app[$this->type];
-
-                       // Don't forget to append it to the element
-                       $domElement->appendChild($domAttribute);
-
-                       // Append it to the document itself
-                       $doc->appendChild($domElement);
-                       $doc->formatOutput = true;
-
-                       $xml = $doc->saveXML();
-
-                       //      _debug_array($xml);
-
                        if (function_exists('com_create_guid') === true)
                        {
                                $guid = trim(com_create_guid(), '{}');
@@ -299,7 +279,7 @@
                                'location_id' => $location_id,
                                'type' => $type,
                                'guid' => $guid,
-                               'xml_representation' => 
$this->db->db_addslashes($xml),
+                               'json_representation' => json_encode($data),
                                'model' => 0,
                                'p_location_id' => 
isset($data['p_location_id']) && $data['p_location_id'] ? 
$data['p_location_id'] : '',
                                'p_id' => isset($data['p_id']) && $data['p_id'] 
? $data['p_id'] : '',




reply via email to

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