fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16861] ditch duplicates


From: sigurdne
Subject: [Fmsystem-commits] [16861] ditch duplicates
Date: Sun, 11 Jun 2017 14:01:14 -0400 (EDT)

Revision: 16861
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16861
Author:   sigurdne
Date:     2017-06-11 14:01:14 -0400 (Sun, 11 Jun 2017)
Log Message:
-----------
ditch duplicates

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

Modified: trunk/property/inc/class.sogeneric_document.inc.php
===================================================================
--- trunk/property/inc/class.sogeneric_document.inc.php 2017-06-11 13:04:28 UTC 
(rev 16860)
+++ trunk/property/inc/class.sogeneric_document.inc.php 2017-06-11 18:01:14 UTC 
(rev 16861)
@@ -226,7 +226,9 @@
                        if ($location_id)
                        {
                                $filtermethod = "WHERE a.location_id = 
{$location_id} AND a.file_id = {$file_id}";
-                       } else {
+                       }
+                       else
+                       {
                                $filtermethod = "WHERE a.file_id = {$file_id}";
                        }
 
@@ -235,7 +237,7 @@
                                $filtermethod .= " AND c.entity_group_id = 
{$entity_group_id}";
                        }
 
-                       $sql = "SELECT a.file_id, b.type, b.id, b.location_id, 
b.location_code, b.json_representation, c.name AS category_name, c.entity_id, 
c.entity_group_id "
+                       $sql = "SELECT DISTINCT a.file_id, b.type, b.id, 
b.location_id, b.location_code, b.json_representation, c.name AS category_name, 
c.entity_id, c.entity_group_id "
                                        . "FROM phpgw_vfs_file_relation a INNER 
JOIN fm_bim_item b ON a.location_id = b.location_id AND a.location_item_id = 
b.id "
                                        . "INNER JOIN fm_entity_category c ON 
b.location_id = c.location_id" ." {$filtermethod} ";
 




reply via email to

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