[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [7430] property: custom import/update
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [7430] property: custom import/update |
Date: |
Fri, 24 Jun 2011 16:53:34 +0000 |
Revision: 7430
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7430
Author: sigurdne
Date: 2011-06-24 16:53:33 +0000 (Fri, 24 Jun 2011)
Log Message:
-----------
property: custom import/update
Modified Paths:
--------------
trunk/property/inc/class.solocation.inc.php
trunk/property/inc/class.uiimport.inc.php
trunk/property/inc/import/default/cvs_import_romdata_bkb
Modified: trunk/property/inc/class.solocation.inc.php
===================================================================
--- trunk/property/inc/class.solocation.inc.php 2011-06-24 13:57:30 UTC (rev
7429)
+++ trunk/property/inc/class.solocation.inc.php 2011-06-24 16:53:33 UTC (rev
7430)
@@ -254,7 +254,7 @@
{
$type_id = count(explode('-',$location_code));
}
- $this->db->query("SELECT count(*) AS cnt FROM
fm_location{$type_id} WHERE location_code='{$location_code}'");
+ $this->db->query("SELECT location_code FROM
fm_location{$type_id} WHERE location_code='{$location_code}'");
return $this->db->next_record();
}
Modified: trunk/property/inc/class.uiimport.inc.php
===================================================================
--- trunk/property/inc/class.uiimport.inc.php 2011-06-24 13:57:30 UTC (rev
7429)
+++ trunk/property/inc/class.uiimport.inc.php 2011-06-24 16:53:33 UTC (rev
7430)
@@ -91,11 +91,11 @@
}
$result = $this->import(); // Do import step,
result determines if finished for this area
- echo '<li class="info">Aktiviteter: finished
step ' .$result. '</li>';
+ echo '<li class="info">Import: finished step '
.$result. '</li>';
while($result != '1')
{
$result = $this->import();
- echo '<li class="info">Aktiviteter:
finished step ' .$result. '</li>';
+ echo '<li class="info">Import: finished
step ' .$result. '</li>';
flush();
}
Modified: trunk/property/inc/import/default/cvs_import_romdata_bkb
===================================================================
--- trunk/property/inc/import/default/cvs_import_romdata_bkb 2011-06-24
13:57:30 UTC (rev 7429)
+++ trunk/property/inc/import/default/cvs_import_romdata_bkb 2011-06-24
16:53:33 UTC (rev 7430)
@@ -16,10 +16,6 @@
public function add($data)
{
-
- $debug = true;
- $ok = true;
-
$location_code = $this->decode($data[0]);
if(!$location_code)
{
@@ -31,7 +27,7 @@
$_test_floor =
"{$location_arr[0]}-{$location_arr[1]}-{$location_arr[2]}";
$_test_zone =
"{$location_arr[0]}-{$location_arr[1]}-{$location_arr[2]}-{$location_arr[3]}";
- $_ok = false;
+ $ok = true;
if(!$this->solocation->check_location($_test_floor))
{
$_ok =
$this->add_location(array('location_code' => $_test_floor, 'name' => "etasje
{{$location_arr[2]}}", 'area' => 0));
@@ -46,16 +42,16 @@
if(!$this->solocation->check_location($location_code))
{
-_debug_array($location_code);
$_ok =
$this->add_location(array('location_code' => $location_code, 'name' =>
$this->decode($data[6]), 'area' => $this->decode($data[7])));
$ok = $_ok && $ok ? $_ok : false;
}
+
return $ok;
}
protected function add_location($data)
{
- $debug = true;
+ $debug = false;
$error = false;
$ok = true;
$value_set = array();
@@ -76,7 +72,7 @@
foreach ($location_arr as $_key => $_loc)
{
$i = $_key +1;
- $value_set["loc1{$i}"] =
sprintf($formatting[$_key],$location_arr[$_key]);
+ $value_set["loc{$i}"] =
sprintf($formatting[$_key],$location_arr[$_key]);
}
$value_set["loc{$type_id}_name"] =
$this->db->db_addslashes($data['name']);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [7430] property: custom import/update,
Sigurd Nes <=