[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] property/class.soadmin_location.php, 1.1.1.7
From: |
nomail |
Subject: |
[Phpgroupware-cvs] property/class.soadmin_location.php, 1.1.1.7 |
Date: |
Tue, 18 May 2004 08:19:43 +0200 |
Update of /property
Modified Files:
Branch:
class.soadmin_location.php
date: 2004/05/18 06:19:43; author: sigurdne; state: Exp; lines: +8 -6
Log Message:
no message
=====================================================================
Index: property/class.soadmin_location.php
diff -u property/class.soadmin_location.php:1.1.1.6
property/class.soadmin_location.php:1.1.1.7
--- property/class.soadmin_location.php:1.1.1.6 Tue May 4 08:42:25 2004
+++ property/class.soadmin_location.php Tue May 18 06:19:43 2004
@@ -588,7 +588,7 @@
}
else
{
- $GLOBALS['phpgw']->db->Execute("DELETE
FROM fm_location_attrib WHERE id='" . $receipt['id'] . "'");
+ $GLOBALS['phpgw']->db->Execute("DELETE
FROM fm_location_attrib WHERE id=" . $receipt['id'] . " AND type_id=" .
$attrib['type_id']);
unset($receipt['id']);
}
@@ -663,6 +663,8 @@
$GLOBALS['phpgw']->db->begintrans();
+ $attrib_type=$attrib['column_info']['type'];
+
if(($OldColumnName !=$attrib['column_name']) ||
($attrib['column_info']['type'] != $dbresult->fields['datatype']))
{
$value_set=array(
@@ -681,7 +683,7 @@
$value_set =
$this->bocommon->validate_db_update($value_set);
- $GLOBALS['phpgw']->db->Execute("UPDATE
fm_location_attrib set $value_set WHERE id=" . $attrib['id']);
+ $GLOBALS['phpgw']->db->Execute("UPDATE
fm_location_attrib set $value_set WHERE id=" . $attrib['id'] . 'AND type_id=' .
$attrib['type_id']);
$attrib['column_info']['type'] =
$this->bocommon->translate_datatype_insert($attrib['column_info']['type']);
@@ -698,7 +700,7 @@
$this->init_process();
//
$this->oProc->RenameColumn('fm_location'.$attrib['type_id'], $OldColumnName,
$attrib['column_name']);
-
$this->oProc->AlterColumn('fm_location'.$attrib['type_id'],$attrib['column_name'],$OldColumnName,$attrib['column_info']);
+
$this->oProc->AlterColumn('fm_location'.$attrib['type_id'],$OldColumnName,$attrib['column_name'],$attrib['column_info']);
}
@@ -729,7 +731,7 @@
}
}
- if($attrib['column_info']['type']!='R' &&
$attrib['column_info']['type']!='CH' && $attrib['column_info']['type']!='LB')
+ if($attrib_type!='R' && $attrib_type!='CH' &&
$attrib_type!='LB')
{
$GLOBALS['phpgw']->db->Execute("DELETE FROM
$choice_table WHERE type_id=" . $attrib['type_id']. " AND attrib_id=" .
$attrib['id']);
}
@@ -781,8 +783,8 @@
$dbresult = $GLOBALS['phpgw']->db->Execute($sql);
$attrib_sort = $dbresult->fields['attrib_sort'];
- $sql2 = "SELECT max(attrib_sort) as max_sort FROM
fm_location_attrib where type_id=$type_id";
- $dbresult = $GLOBALS['phpgw']->db->Execute($sql2);
+ $sql = "SELECT max(attrib_sort) as max_sort FROM
fm_location_attrib where type_id=$type_id";
+ $dbresult = $GLOBALS['phpgw']->db->Execute($sql);
$max_sort = $dbresult->fields['max_sort'];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] property/class.soadmin_location.php, 1.1.1.7,
nomail <=