fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [15723]


From: nelson . guerra
Subject: [Fmsystem-commits] [15723]
Date: Fri, 23 Sep 2016 00:50:39 +0000 (UTC)

Revision: 15723
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15723
Author:   nelson224
Date:     2016-09-23 00:50:39 +0000 (Fri, 23 Sep 2016)
Log Message:
-----------


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

Modified: 
branches/dev-syncromind-2/property/inc/import/class.import_component_files.inc.php
===================================================================
--- 
branches/dev-syncromind-2/property/inc/import/class.import_component_files.inc.php
  2016-09-23 00:50:24 UTC (rev 15722)
+++ 
branches/dev-syncromind-2/property/inc/import/class.import_component_files.inc.php
  2016-09-23 00:50:39 UTC (rev 15723)
@@ -24,7 +24,7 @@
                        return true;
                }
                
-               public function add_files($id, $location_code)
+               public function add_files($id, $location_code, $component_id)
                {               
                        $exceldata = 
$this->_getexceldata($_FILES['file']['tmp_name'], true);
                        $component_files = array();
@@ -60,7 +60,7 @@
                                                $component = array('id' => $id, 
'location_id' => $GLOBALS['phpgw']->locations->get_id('property', 
'.location.'.count(explode('-', $location_code))));
                                        }
                                        else {
-                                               $component = 
$this->_get_component($k);
+                                               $component = 
$this->_get_component($k, $component_id);
                                                if( empty($component['id']) || 
empty($component['location_id']))
                                                {
                                                        throw new 
Exception("component {$k} does not exist");
@@ -109,14 +109,14 @@
                }
                
                
-               private function _get_component( $query )
+               private function _get_component( $query, $component_id)
                {
                        if ($query)
                        {
                                $query = $this->db->db_addslashes($query);
                        }
 
-                       $sql = "SELECT * FROM fm_bim_item WHERE 
json_representation->>'benevnelse' = '{$query}'";
+                       $sql = "SELECT * FROM fm_bim_item WHERE 
json_representation->>'{$component_id}' = '{$query}'";
 
                        $this->db->query($sql, __LINE__, __FILE__);
 




reply via email to

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