[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/inc class.soadmin_entity.inc.php class...
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] property/inc class.soadmin_entity.inc.php class... |
Date: |
Tue, 14 Feb 2006 19:32:20 +0000 |
CVSROOT: /sources/phpgroupware
Module name: property
Branch:
Changes by: Sigurd Nes <address@hidden> 06/02/14 19:32:20
Modified files:
inc : class.soadmin_entity.inc.php
class.soadmin_location.inc.php
class.soagreement.inc.php
class.sos_agreement.inc.php
Log message:
no message
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.soadmin_entity.inc.php.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.soadmin_location.inc.php.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.soagreement.inc.php.diff?tr1=1.12&tr2=1.13&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/property/inc/class.sos_agreement.inc.php.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
Patches:
Index: property/inc/class.soadmin_entity.inc.php
diff -u property/inc/class.soadmin_entity.inc.php:1.15
property/inc/class.soadmin_entity.inc.php:1.16
--- property/inc/class.soadmin_entity.inc.php:1.15 Tue Feb 7 19:22:01 2006
+++ property/inc/class.soadmin_entity.inc.php Tue Feb 14 19:32:20 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage admin
- * @version $Id: class.soadmin_entity.inc.php,v 1.15 2006/02/07 19:22:01
sigurdne Exp $
+ * @version $Id: class.soadmin_entity.inc.php,v 1.16 2006/02/14 19:32:20
sigurdne Exp $
*/
/**
@@ -734,7 +734,7 @@
function delete_attrib($cat_id,$entity_id,$attrib_id)
{
$this->init_process();
-
+ $this->oProc->m_odb->transaction_begin();
$this->db->transaction_begin();
$sql = "SELECT * FROM fm_entity_attribute WHERE
entity_id=$entity_id AND cat_id=$cat_id AND id=$attrib_id";
@@ -766,6 +766,8 @@
$this->db->query("DELETE FROM fm_entity_attribute WHERE
entity_id=$entity_id AND cat_id=$cat_id AND id=$attrib_id",__LINE__,__FILE__);
$this->db->query("DELETE FROM fm_entity_history WHERE
history_appname = 'entity_" . $entity_id . '_' . $cat_id . "' AND
history_entity_attrib_id = $attrib_id",__LINE__,__FILE__);
$this->db->transaction_commit();
+ $this->oProc->m_odb->transaction_commit();
+
}
function delete_status($cat_id,$entity_id,$status_id)
Index: property/inc/class.soadmin_location.inc.php
diff -u property/inc/class.soadmin_location.inc.php:1.16
property/inc/class.soadmin_location.inc.php:1.17
--- property/inc/class.soadmin_location.inc.php:1.16 Tue Feb 7 19:22:01 2006
+++ property/inc/class.soadmin_location.inc.php Tue Feb 14 19:32:20 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage admin
- * @version $Id: class.soadmin_location.inc.php,v 1.16 2006/02/07
19:22:01 sigurdne Exp $
+ * @version $Id: class.soadmin_location.inc.php,v 1.17 2006/02/14
19:32:20 sigurdne Exp $
*/
/**
@@ -429,7 +429,11 @@
function delete($type_id,$id,$attrib)
{
+ $table_def = $this->get_table_def($type_id);
+
$this->init_process();
+ $this->oProc->m_odb->transaction_begin();
+ $this->db->transaction_begin();
if($attrib)
{
@@ -439,8 +443,8 @@
$this->db->next_record();
$ColumnName =
$this->db->f('column_name');
- $this->oProc->DropColumn('fm_location'
.$type_id ,'', $ColumnName);
- $this->oProc->DropColumn('fm_location'
.$type_id . '_history','', $ColumnName);
+ $this->oProc->DropColumn('fm_location'
.$type_id ,$table_def['fm_location'.$type_id], $ColumnName);
+ $this->oProc->DropColumn('fm_location'
.$type_id . '_history',$table_def['fm_location'.$type_id . '_history'],
$ColumnName);
}
else
{
@@ -454,6 +458,8 @@
$this->db->query("DELETE FROM
fm_location_choice WHERE type_id='" . $id . "'",__LINE__,__FILE__);
}
$this->db->query("DELETE FROM $table WHERE id='" . $id
. "'",__LINE__,__FILE__);
+ $this->db->transaction_commit();
+ $this->oProc->m_odb->transaction_commit();
}
function read_attrib($data)
@@ -691,20 +697,24 @@
$column_info['nullable'] =
$this->db->f('nullable');
$location_type =
$this->db->f('location_type');
+ $table_def = $this->get_table_def($location_type);
+
if(!($location_type==$values[$column_name]))
{
$this->init_process();
+ $this->oProc->m_odb->transaction_begin();
+ $this->db->transaction_begin();
if($this->oProc->AddColumn('fm_location'.$values[$column_name],$column_name,
$column_info))
{
if($column_name=='street_id')
{
$this->oProc->AddColumn('fm_location'.$values[$column_name],'street_number',
array('type'=>'varchar','precision'=>10));
-
$this->oProc->DropColumn('fm_location' .$location_type ,'','street_number');
+
$this->oProc->DropColumn('fm_location' .$location_type
,$table_def['fm_location'.$location_type],'street_number');
}
- $this->oProc->DropColumn('fm_location'
.$location_type ,'', $column_name);
- $this->oProc->DropColumn('fm_location'
.$location_type . ' _history','', $column_name);
+ $this->oProc->DropColumn('fm_location'
.$location_type ,$table_def['fm_location'.$location_type], $column_name);
+ $this->oProc->DropColumn('fm_location'
.$location_type . ' _history',$table_def['fm_location'.$location_type .
'_history'], $column_name);
$this->db->query("UPDATE
fm_location_config set
@@ -717,6 +727,8 @@
$receipt['message'][] = array('msg'
=> lang('column %1 could not be moved',$column_name));
}
+ $this->db->transaction_commit();
+ $this->oProc->m_odb->transaction_commit();
}
return $receipt;
@@ -949,6 +961,14 @@
$table_def['fm_location'.$id]['uc'] = array();
}
+ $fd['exp_date'] = array('type' =>
'timestamp','nullable' => True,'default' => 'current_timestamp');
+
+ $table_def['fm_location'.$id . '_history']['fd'] = $fd;
+ $table_def['fm_location'.$id . '_history']['pk'] =
array();
+ $table_def['fm_location'.$id . '_history']['fk'] =
array();
+ $table_def['fm_location'.$id . '_history']['ix'] =
array();
+ $table_def['fm_location'.$id . '_history']['uc'] =
array();
+
return $table_def;
}
Index: property/inc/class.soagreement.inc.php
diff -u property/inc/class.soagreement.inc.php:1.12
property/inc/class.soagreement.inc.php:1.13
--- property/inc/class.soagreement.inc.php:1.12 Sun Feb 12 14:01:14 2006
+++ property/inc/class.soagreement.inc.php Tue Feb 14 19:32:20 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage agreement
- * @version $Id: class.soagreement.inc.php,v 1.12 2006/02/12 14:01:14
sigurdne Exp $
+ * @version $Id: class.soagreement.inc.php,v 1.13 2006/02/14 19:32:20
sigurdne Exp $
*/
/**
@@ -1520,7 +1520,11 @@
{
$table = 'fm_agreement';
$attribute_table = 'fm_agreement_attribute';
+ $table_def = $this->get_table_def($table);
+
$this->init_process();
+ $this->oProc->m_odb->transaction_begin();
+ $this->db->transaction_begin();
$sql = "SELECT * FROM $attribute_table WHERE
id=$attrib_id";
@@ -1528,7 +1532,7 @@
$this->db->next_record();
$ColumnName = $this->db->f('column_name');
- if($this->oProc->DropColumn($table,'', $ColumnName))
+ if($this->oProc->DropColumn($table,$table_def[$table],
$ColumnName))
{
$sql = "SELECT attrib_sort FROM
$attribute_table where id=$attrib_id";
$this->db->query($sql);
@@ -1551,6 +1555,9 @@
$receipt['error'][] = array('msg' =>
lang('Attribute has NOT been deleted'));
}
+ $this->db->transaction_commit();
+ $this->oProc->m_odb->transaction_commit();
+
return $receipt;
}
Index: property/inc/class.sos_agreement.inc.php
diff -u property/inc/class.sos_agreement.inc.php:1.19
property/inc/class.sos_agreement.inc.php:1.20
--- property/inc/class.sos_agreement.inc.php:1.19 Mon Feb 13 14:40:56 2006
+++ property/inc/class.sos_agreement.inc.php Tue Feb 14 19:32:20 2006
@@ -8,7 +8,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package property
* @subpackage agreement
- * @version $Id: class.sos_agreement.inc.php,v 1.19 2006/02/13 14:40:56
sigurdne Exp $
+ * @version $Id: class.sos_agreement.inc.php,v 1.20 2006/02/14 19:32:20
sigurdne Exp $
*/
/**
@@ -1520,7 +1520,11 @@
{
$table = 'fm_s_agreement';
$attribute_table = 'fm_s_agreement_attribute';
+ $table_def = $this->get_table_def($table);
+
$this->init_process();
+ $this->oProc->m_odb->transaction_begin();
+ $this->db->transaction_begin();
$sql = "SELECT * FROM $attribute_table WHERE
id=$attrib_id";
@@ -1528,7 +1532,7 @@
$this->db->next_record();
$ColumnName = $this->db->f('column_name');
- if($this->oProc->DropColumn($table,'', $ColumnName))
+ if($this->oProc->DropColumn($table,$table_def[$table],
$ColumnName))
{
$sql = "SELECT attrib_sort FROM
$attribute_table where id=$attrib_id";
$this->db->query($sql);
@@ -1551,6 +1555,9 @@
$receipt['error'][] = array('msg' =>
lang('Attribute has NOT been deleted'));
}
+ $this->db->transaction_commit();
+ $this->oProc->m_odb->transaction_commit();
+
return $receipt;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/inc class.soadmin_entity.inc.php class...,
Sigurd Nes <=