[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [15478]
From: |
nelson . guerra |
Subject: |
[Fmsystem-commits] [15478] |
Date: |
Wed, 17 Aug 2016 01:17:33 +0000 (UTC) |
Revision: 15478
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15478
Author: nelson224
Date: 2016-08-17 01:17:33 +0000 (Wed, 17 Aug 2016)
Log Message:
-----------
Modified Paths:
--------------
branches/dev-syncromind-2/property/inc/class.uiimport_components.inc.php
Modified:
branches/dev-syncromind-2/property/inc/class.uiimport_components.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.uiimport_components.inc.php
2016-08-17 01:17:19 UTC (rev 15477)
+++ branches/dev-syncromind-2/property/inc/class.uiimport_components.inc.php
2016-08-17 01:17:33 UTC (rev 15478)
@@ -48,7 +48,7 @@
$this->bocommon = CreateObject('property.bocommon');
$this->acl = & $GLOBALS['phpgw']->acl;
$this->db = & $GLOBALS['phpgw']->db;
- $this->tmp_upload_dir =
'/var/lib/phpgw/syncromind/tmp_upload/';
+ $this->tmp_upload_dir =
'/var/lib/phpgw/syncromind/test/';
$GLOBALS['phpgw_info']['flags']['menu_selection'] =
"property::documentation::generic";
}
@@ -83,14 +83,6 @@
{
return $message['error'][] = array('msg' =>
'location code is empty');
}
-
- $components_added =
$GLOBALS['phpgw']->session->appsession('components', 'property');
-
- if (!count($components_added))
- {
- $message['error'][] = array('msg' => 'not
stored components');
- return $this->jquery_results($message);
- }
$exceldata =
$this->getexceldata($_FILES['file']['tmp_name'], true);
$relations = array();
@@ -118,7 +110,7 @@
$component = array('id' => $id,
'location_id' => $GLOBALS['phpgw']->locations->get_id('property',
'.location.'.count(explode('-', $location_code))));
}
else {
- $component =
$components_added[$k];
+ $component =
$this->get_component[$k];
if( empty($component['id']) ||
empty($component['location_id']))
{
throw new
Exception("component {$k} does not exist");
@@ -165,6 +157,7 @@
return $this->jquery_results($message);
}
+
public function handle_import_files()
{
require_once PHPGW_SERVER_ROOT .
"/property/inc/import/UploadHandler.php";
@@ -173,7 +166,29 @@
$upload_handler = new UploadHandler($options);
}
+ protected function get_component( $query )
+ {
+ if ($query)
+ {
+ $query = $this->db->db_addslashes($query);
+ }
+
+ $sql = "SELECT * FROM fm_bim_item WHERE
json_representation->>'benevnelse' = '{$query}'";
+
+ $this->db->query($sql, __LINE__, __FILE__);
+
+ $values = array();
+
+ if ($this->db->next_record())
+ {
+ $values['id'] = $this->db->f('id');
+ $values['location_id'] =
$this->db->f('location_id');
+ }
+
+ return $values;
+ }
+
private function save_file( $tmp_file )
{
$bofiles = CreateObject('property.bofiles');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [15478],
nelson . guerra <=