fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11256] property: fix delete entity item


From: Sigurd Nes
Subject: [Fmsystem-commits] [11256] property: fix delete entity item
Date: Fri, 09 Aug 2013 07:56:47 +0000

Revision: 11256
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11256
Author:   sigurdne
Date:     2013-08-09 07:56:16 +0000 (Fri, 09 Aug 2013)
Log Message:
-----------
property: fix delete entity item

Modified Paths:
--------------
    trunk/property/inc/class.soentity.inc.php

Modified: trunk/property/inc/class.soentity.inc.php
===================================================================
--- trunk/property/inc/class.soentity.inc.php   2013-08-09 07:48:23 UTC (rev 
11255)
+++ trunk/property/inc/class.soentity.inc.php   2013-08-09 07:56:16 UTC (rev 
11256)
@@ -2196,7 +2196,7 @@
                        $cat_id         = (int) $cat_id;
                        $id                     = (int) $id;
 
-                       $location2_id   = 
$GLOBALS['phpgw']->locations->get_id($this->type_app[$this->type], 
".{$this->type}.{$entity_id}.{$cat_id}");
+                       $location_id    = 
$GLOBALS['phpgw']->locations->get_id($this->type_app[$this->type], 
".{$this->type}.{$entity_id}.{$cat_id}");
 
                        $admin_entity   = 
CreateObject('property.soadmin_entity');
                        $admin_entity->type = $this->type;
@@ -2217,8 +2217,9 @@
                                $this->db->query("DELETE FROM $table WHERE id = 
$id",__LINE__,__FILE__);
                        }
 
+                       $this->db->query("DELETE FROM phpgw_interlink WHERE 
location1_id ={$location_id} AND location1_item_id = {$id}",__LINE__,__FILE__);
+                       $this->db->query("DELETE FROM phpgw_interlink WHERE 
location2_id ={$location_id} AND location2_item_id = {$id}",__LINE__,__FILE__);
 
-                       $this->db->query("DELETE FROM phpgw_interlink WHERE 
location2_id ={$location2_id} AND location2_item_id = {$id}",__LINE__,__FILE__);
                        $this->db->transaction_commit();
                }
 




reply via email to

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