phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/class.sodocument.php, 1.1.1.7


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

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

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

Log Message:
no message
=====================================================================
Index: property/class.sodocument.php
diff -u property/class.sodocument.php:1.1.1.6 
property/class.sodocument.php:1.1.1.7
--- property/class.sodocument.php:1.1.1.6       Fri Apr 30 17:35:56 2004
+++ property/class.sodocument.php       Sun May  9 13:42:22 2004
@@ -443,11 +443,15 @@
 
                        $values = $this->bocommon->validate_db_insert($values);
 
-                       $GLOBALS['phpgw']->db->Execute("INSERT INTO fm_document 
(document_name,link,title,access,category,entry_date,document_date,version,coordinator,status,"
+                       $GLOBALS['phpgw']->db->begintrans();
+                       $id = 
$GLOBALS['phpgw']->db->genid('fm_document_id_seq');
+
+                       $GLOBALS['phpgw']->db->Execute("INSERT INTO fm_document 
(id,document_name,link,title,access,category,entry_date,document_date,version,coordinator,status,"
                                . 
"descr,location_code,address,branch_id,vendor_id,user_id $cols) "
-                               . "VALUES ($values $vals )");
+                               . "VALUES ($id,$values $vals )");
 
-                       $receipt['document_id'] = 
$this->db->get_last_insert_id('fm_document','id');
+//                     $receipt['document_id'] = 
$this->db->get_last_insert_id('fm_document','id');
+                       $receipt['document_id'] = $id;
 
                        
$this->historylog->add('SO',$receipt['document_id'],$document['status']);
                        
$this->historylog->add('TO',$receipt['document_id'],$document['doc_type']);
@@ -465,6 +469,8 @@
                        }
 
                        $receipt['message'][] = array('msg'=>lang('document %1 
has been saved',"'".$document['document_name']."'"));
+                       $GLOBALS['phpgw']->db->committrans();
+
                        return $receipt;
                }
 




reply via email to

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