fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16138] fix filter on item within location_id


From: sigurdne
Subject: [Fmsystem-commits] [16138] fix filter on item within location_id
Date: Tue, 3 Jan 2017 18:37:09 +0000 (UTC)

Revision: 16138
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16138
Author:   sigurdne
Date:     2017-01-03 18:37:09 +0000 (Tue, 03 Jan 2017)
Log Message:
-----------
fix filter on item within location_id

Modified Paths:
--------------
    branches/dev-syncromind-2/property/inc/class.sogeneric_document.inc.php
    branches/dev-syncromind-2/property/inc/class.uilocation.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     
2017-01-03 18:18:26 UTC (rev 16137)
+++ branches/dev-syncromind-2/property/inc/class.sogeneric_document.inc.php     
2017-01-03 18:37:09 UTC (rev 16138)
@@ -53,6 +53,7 @@
                        $user_id = isset($data['user_id']) && $data['user_id'] 
? (int)$data['user_id'] : 0;
                        $cat_id = isset($data['cat_id']) && $data['cat_id'] ? 
(int)$data['cat_id'] : 0;
                        $location_id = isset($data['location_id']) && 
$data['location_id'] ? (int)$data['location_id'] : 0;
+                       $location_item_id = isset($data['location_item_id']) && 
$data['location_item_id'] ? (int)$data['location_item_id'] : 0;
                        $mime_type = isset($data['mime_type']) ? 
$data['mime_type'] : '';
                        $start_date = isset($data['start_date']) ? 
$data['start_date'] : 0;
                        $end_date = isset($data['end_date']) ? 
$data['end_date'] : 0;
@@ -94,6 +95,11 @@
                                $filtermethod .= " AND c.location_id = 
{$location_id}";
                        } 
                        
+                       if($location_item_id)
+                       {
+                               $filtermethod .= " AND c.location_item_id = 
{$location_item_id}";
+                       }
+
                        if ($user_id)
                        {
                                $filtermethod .= " AND a.createdby_id = 
{$user_id}";

Modified: branches/dev-syncromind-2/property/inc/class.uilocation.inc.php
===================================================================
--- branches/dev-syncromind-2/property/inc/class.uilocation.inc.php     
2017-01-03 18:18:26 UTC (rev 16137)
+++ branches/dev-syncromind-2/property/inc/class.uilocation.inc.php     
2017-01-03 18:37:09 UTC (rev 16138)
@@ -1720,6 +1720,7 @@
                        $location_id = 
$GLOBALS['phpgw']->locations->get_id('property', '.location.' . 
count(explode('-', $location_code)));
                        $generic_document = 
CreateObject('property.sogeneric_document');
                        $params['location_id'] = $location_id;
+                       $params['location_item_id'] = $this->bo->get_item_id( 
$location_code );
                        $params['order'] = 'name';
                        $params['cat_id'] = $doc_type;
                        $documents2 = $generic_document->read($params);




reply via email to

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