phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] property/class.sotenant.php, 1.1.1.8


From: nomail
Subject: [Phpgroupware-cvs] property/class.sotenant.php, 1.1.1.8
Date: Tue, 18 May 2004 19:53:21 +0200

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

date: 2004/05/18 17:53:21;  author: sigurdne;  state: Exp;  lines: +13 -13

Log Message:
no message
=====================================================================
Index: property/class.sotenant.php
diff -u property/class.sotenant.php:1.1.1.7 property/class.sotenant.php:1.1.1.8
--- property/class.sotenant.php:1.1.1.7 Tue May 18 06:19:43 2004
+++ property/class.sotenant.php Tue May 18 17:53:21 2004
@@ -143,15 +143,15 @@
                        {
                                $cols = $entity_table . 
'.*,fm_tenant_category.descr as category';
 
-                               $cols_return[]                          = 
'tenant_id';
+                               $cols_return[]                          = 'id';
                                $uicols['input_type'][]         = 'text';
-                               $uicols['name'][]                       = 
'tenant_id';
+                               $uicols['name'][]                       = 'id';
                                $uicols['descr'][]                      = 
lang('ID');
                                $uicols['statustext'][]         = lang('ID');
 
-                               $cols_return[]                          = 
'tenant_id';
+                               $cols_return[]                          = 'id';
                                $uicols['input_type'][]         = 'hidden';
-                               $uicols['name'][]                       = 
'tenant_id';
+                               $uicols['name'][]                       = 'id';
                                $uicols['descr'][]                      = false;
                                $uicols['statustext'][]         = false;
 
@@ -233,7 +233,7 @@
                        }
                        else
                        {
-                               $ordermethod = ' order by tenant_id DESC';
+                               $ordermethod = " order by $entity_table.id 
DESC";
                        }
 
                        $where= 'WHERE';
@@ -389,7 +389,7 @@
 
                        if($tenant_id)
                        {
-                               $dbresult = 
$GLOBALS['phpgw']->db->Execute("SELECT * from fm_tenant where 
tenant_id='$tenant_id'");
+                               $dbresult = 
$GLOBALS['phpgw']->db->Execute("SELECT * from fm_tenant where id='$tenant_id'");
 
                                if (!$dbresult->EOF)
                                {
@@ -436,13 +436,13 @@
                        }
 
                        $GLOBALS['phpgw']->db->begintrans();
-                       $tenant_id = 
$GLOBALS['phpgw']->db->genid('fm_tenant_tenant_id_seq');
+                       $id = 
$GLOBALS['phpgw']->db->genid('fm_tenant_tenant_id_seq');
 
-                       $GLOBALS['phpgw']->db->Execute("INSERT INTO fm_tenant 
(tenant_id,entry_date,last_name,first_name,contact_phone,category $cols) "
-                               . "VALUES ($tenant_id,'" . time() . "','" . 
$tenant['last_name'] . "','" . $tenant['first_name'] . "','" . 
$tenant['contact_phone'] . "','" . $tenant['cat_id'] . "' $vals)");
+                       $GLOBALS['phpgw']->db->Execute("INSERT INTO fm_tenant 
(id,entry_date,last_name,first_name,contact_phone,category $cols) "
+                               . "VALUES ($id,'" . time() . "','" . 
$tenant['last_name'] . "','" . $tenant['first_name'] . "','" . 
$tenant['contact_phone'] . "','" . $tenant['cat_id'] . "' $vals)");
 
-//                     $receipt['tenant_id']= 
$this->db->get_last_insert_id('fm_tenant','tenant_id');
-                       $receipt['tenant_id']= $tenant_id;
+//                     $receipt['tenant_id']= 
$this->db->get_last_insert_id('fm_tenant','id');
+                       $receipt['tenant_id']= $id;
                        $receipt['message'][] = array('msg'=>lang('tenant %1 
has been saved',$receipt['tenant_id']));
 
                        $GLOBALS['phpgw']->db->committrans();
@@ -472,7 +472,7 @@
                        }
 
                        $GLOBALS['phpgw']->db->Execute("UPDATE fm_tenant set 
last_name='" . $tenant['last_name'] . "', first_name='" . $tenant['first_name'] 
. "', contact_phone='" . $tenant['contact_phone'] . "', entry_date='" . time() 
. "', category='"
-                                                       . $tenant['cat_id'] . 
"' $value_set WHERE tenant_id=" . intval($tenant['tenant_id']));
+                                                       . $tenant['cat_id'] . 
"' $value_set WHERE id=" . intval($tenant['tenant_id']));
 
                        $receipt['tenant_id']= $tenant['tenant_id'];
                        $receipt['message'][] = array('msg'=>lang('tenant %1 
has been edited',$tenant['tenant_id']));
@@ -481,7 +481,7 @@
 
                function delete($tenant_id)
                {
-                       $GLOBALS['phpgw']->db->Execute('DELETE FROM fm_tenant 
WHERE tenant_id=' . intval($tenant_id));
+                       $GLOBALS['phpgw']->db->Execute('DELETE FROM fm_tenant 
WHERE id=' . intval($tenant_id));
                }
 
                function read_attrib($data)




reply via email to

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