[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16034]
From: |
nelson . guerra |
Subject: |
[Fmsystem-commits] [16034] |
Date: |
Wed, 30 Nov 2016 02:49:05 +0000 (UTC) |
Revision: 16034
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16034
Author: nelson224
Date: 2016-11-30 02:49:04 +0000 (Wed, 30 Nov 2016)
Log Message:
-----------
Modified Paths:
--------------
branches/dev-syncromind-2/property/inc/class.sogeneric_document.inc.php
Modified:
branches/dev-syncromind-2/property/inc/class.sogeneric_document.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.sogeneric_document.inc.php
2016-11-30 02:48:52 UTC (rev 16033)
+++ branches/dev-syncromind-2/property/inc/class.sogeneric_document.inc.php
2016-11-30 02:49:04 UTC (rev 16034)
@@ -193,18 +193,24 @@
return $values;
}
- function save_file_relations( $items = array(), $location_id,
$file_id )
+ function save_file_relations( $add, $delete, $location_id,
$file_id )
{
$this->db->transaction_begin();
- $this->db->query("DELETE FROM phpgw_vfs_file_relation
WHERE file_id = {$file_id} AND location_id = {$location_id}", __LINE__,
__FILE__);
-
+ if (count($delete))
+ {
+ foreach($delete as $item)
+ {
+ $this->db->query("DELETE FROM
phpgw_vfs_file_relation WHERE location_item_id = {$item} AND file_id =
{$file_id} AND location_id = {$location_id}", __LINE__, __FILE__);
+ }
+ }
+
$date_format =
phpgwapi_datetime::date_array(date('Y-m-d'));
$date = mktime(2, 0, 0, $date_format['month'],
$date_format['day'], $date_format['year']);
- if (count($items))
+ if (count($add))
{
- foreach($items as $item)
+ foreach($add as $item)
{
$values_insert = array
(
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16034],
nelson . guerra <=