[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11517] property: remove obsolete
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11517] property: remove obsolete |
Date: |
Mon, 09 Dec 2013 11:37:45 +0000 |
Revision: 11517
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11517
Author: sigurdne
Date: 2013-12-09 11:37:41 +0000 (Mon, 09 Dec 2013)
Log Message:
-----------
property: remove obsolete
Removed Paths:
-------------
trunk/property/inc/import/default/cvs_import_bygningsdelstabell_bkb
Deleted: trunk/property/inc/import/default/cvs_import_bygningsdelstabell_bkb
===================================================================
--- trunk/property/inc/import/default/cvs_import_bygningsdelstabell_bkb
2013-12-08 21:27:13 UTC (rev 11516)
+++ trunk/property/inc/import/default/cvs_import_bygningsdelstabell_bkb
2013-12-09 11:37:41 UTC (rev 11517)
@@ -1,100 +0,0 @@
-<?php
- class import_conversion
- {
- protected $db;
- public $messages = array();
- public $warnings = array();
- public $errors = array();
- public $debug = true;
- public function __construct()
- {
- if(!$GLOBALS['phpgw']->acl->check('run',
phpgwapi_acl::READ, 'admin'))
- {
- die('go away');
- }
- set_time_limit(1000); //Set the time limit for this
request to 1000 seconds
- $this->account =
(int)$GLOBALS['phpgw_info']['user']['account_id'];
- $this->db = & $GLOBALS['phpgw']->db;
- $this->db->query("DELETE FROM fm_building_part");
- }
-
- public function add($data)
- {
- $debug = $this->debug;
- $success = false;
- if(!$data[2])
- {
- return true;
- }
-
- if($debug)
- {
- _debug_array($data);
- }
-
- $value_set = array();
-
- $value_set['id'] = $data[2];
- $value_set['descr'] =
$this->db->db_addslashes($data[3]);
- $value_set['filter_1'] = $data[4] ? 1 : '';
- $value_set['filter_2'] = $data[5] ? 1 : '';
- $value_set['filter_3'] = $data[6] ? 1 : '';
- $value_set['filter_4'] = $data[7] ? 1 : '';
-
-
- $cols = implode(',', array_keys($value_set));
- $values =
$this->db->validate_insert(array_values($value_set));
-
- $sql = "INSERT INTO fm_building_part ({$cols}) VALUES
({$values})";
-
- if($debug)
- {
- _debug_array($sql);
- }
- else
- {
- $success =
$this->db->query($sql,__LINE__,__FILE__);
- if($success)
- {
- $this->messages[] = "Successfully
imported building part: Title ({$data[2]}::{$data[3]})";
- $ok = true;
- }
- else
- {
- $this->errors[] = "Error importing
building part: Title ({$data[2]}::{$data[3]})";
- $ok = false;
- }
- }
-
- //update ticket
- $value_set = array();
- if($data[0])
- {
- $value_set['building_part'] =
$data[2];
- $value_set =
$this->db->validate_update($value_set);
- $sql = "UPDATE fm_tts_tickets SET {$value_set}
WHERE building_part = '{$data[0]}'";
-
-
- if($debug)
- {
- _debug_array($sql);
- }
- else
- {
- $success =
$this->db->query($sql,__LINE__,__FILE__);
- if($success)
- {
- $this->messages[] =
"Successfully updatet building part in ticket: Title ({$data[2]}::{$data[3]})";
- $ok = true;
- }
- else
- {
- $this->errors[] = "Error
updating building part in ticket: Title ({$data[2]}::{$data[3]})";
- $ok = false;
- }
- }
- }
-
- return $ok;
- }
- }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11517] property: remove obsolete,
Sigurd Nes <=