[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] ged/inc class.ged_dm.inc.php
From: |
Pascal Vilarem |
Subject: |
[Phpgroupware-cvs] ged/inc class.ged_dm.inc.php |
Date: |
Mon, 02 Apr 2007 18:06:36 +0000 |
CVSROOT: /sources/phpgroupware
Module name: ged
Changes by: Pascal Vilarem <maat> 07/04/02 18:06:36
Modified files:
inc : class.ged_dm.inc.php
Log message:
fix : remove also relations when deleting a document
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ged/inc/class.ged_dm.inc.php?cvsroot=phpgroupware&r1=1.20&r2=1.21
Patches:
Index: class.ged_dm.inc.php
===================================================================
RCS file: /sources/phpgroupware/ged/inc/class.ged_dm.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- class.ged_dm.inc.php 2 Apr 2007 17:59:09 -0000 1.20
+++ class.ged_dm.inc.php 2 Apr 2007 18:06:36 -0000 1.21
@@ -230,10 +230,14 @@
{
unlink (
$version['file_full_path'] );
}
- }
+ // TODO : Effacement des relations
+ $sqlr="DELETE FROM
".$this->tables['relations']." WHERE
linking_version_id=".$version['version_id']." ";
+ $sqlr.="OR
linked_version_id=".$version['version_id']." ";
+
+ $this->db->query($sqlr, __LINE__,
__FILE__);
+ }
// Effacement des versions
- $this->db->debug=true;
$sqlv="DELETE FROM
".$this->tables['versions']." WHERE element_id=".$element_id;
$this->db->query($sqlv, __LINE__, __FILE__);
break;