phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] property/class.soowner.php, 1.1.1.6


From: nomail
Subject: [Phpgroupware-cvs] property/class.soowner.php, 1.1.1.6
Date: Sun, 9 May 2004 15:42:23 +0200

Update of /property
Modified Files:
        Branch: 
          class.soowner.php

date: 2004/05/09 13:42:23;  author: sigurdne;  state: Exp;  lines: +9 -4

Log Message:
no message
=====================================================================
Index: property/class.soowner.php
diff -u property/class.soowner.php:1.1.1.5 property/class.soowner.php:1.1.1.6
--- property/class.soowner.php:1.1.1.5  Thu Apr 29 07:10:49 2004
+++ property/class.soowner.php  Sun May  9 13:42:23 2004
@@ -146,12 +146,17 @@
                {
                        $owner['name'] = 
$this->functions->db_addslashes($owner['name']);
 
-                       $GLOBALS['phpgw']->db->Execute("INSERT INTO fm_owner 
(entry_date,remark,abid,org_name,category) "
-                               . "VALUES ('" . time() . "','" . 
$owner['remark'] . "','" . $owner['abid'] . "','" . $owner['org_name']
+                       $GLOBALS['phpgw']->db->begintrans();
+                       $owner_id = 
$GLOBALS['phpgw']->db->genid('fm_owner_owner_id_seq');
+
+                       $GLOBALS['phpgw']->db->Execute("INSERT INTO fm_owner 
(owner_id,entry_date,remark,abid,org_name,category) "
+                               . "VALUES ($owner_id,'" . time() . "','" . 
$owner['remark'] . "','" . $owner['abid'] . "','" . $owner['org_name']
                                . "','" . $owner['cat_id'] . "')");
 
-                       $receipt['owner_id']= 
$this->db->get_last_insert_id('fm_owner','owner_id');
+//                     $receipt['owner_id']= 
$this->db->get_last_insert_id('fm_owner','owner_id');
+                       $receipt['owner_id']= $owner_id;
                        $receipt['message'][] = array('msg'=>lang('owner %1 has 
been saved',$receipt['owner_id']));
+                       $GLOBALS['phpgw']->db->committrans();
                        return $receipt;
                }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]