fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [15395] update sojasper


From: sigurdne
Subject: [Fmsystem-commits] [15395] update sojasper
Date: Fri, 29 Jul 2016 13:37:17 +0000 (UTC)

Revision: 15395
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15395
Author:   sigurdne
Date:     2016-07-29 13:37:16 +0000 (Fri, 29 Jul 2016)
Log Message:
-----------
update sojasper

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

Modified: trunk/property/inc/class.sojasper.inc.php
===================================================================
--- trunk/property/inc/class.sojasper.inc.php   2016-07-29 08:53:44 UTC (rev 
15394)
+++ trunk/property/inc/class.sojasper.inc.php   2016-07-29 13:37:16 UTC (rev 
15395)
@@ -74,8 +74,14 @@
                                $ordermethod = ' ORDER BY id asc';
                        }
 
+                       $where = 'WHERE';
+                       if ($location_id)
+                       {
+                               $filtermethod = "{$where} location_id = 
{$location_id}";
+                               $where = 'AND';
+                       }
 
-                       $filtermethod = "WHERE {$table}.user_id = 
{$this->account}";
+                       $filtermethod .= " {$where} ({$table}.user_id = 
{$this->account}";
                        $public_user_list = array();
                        if (is_array($grants['accounts']) && 
$grants['accounts'])
                        {
@@ -96,7 +102,7 @@
                                }
                                unset($user);
                                reset($public_group_list);
-                               $filtermethod .= " OR access='public' AND 
phpgw_group_map.group_id IN(" . implode(',', $public_group_list) . "))";
+                               $filtermethod .= " OR access='public' AND 
phpgw_group_map.group_id IN(" . implode(',', $public_group_list) . ")))";
                                $where = 'AND';
                        }
                        if($public_user_list && !$public_group_list)
@@ -104,11 +110,6 @@
                                $filtermethod .=')';
                        }
 
-                       if ($location_id)
-                       {
-                               $filtermethod .= " AND location_id = 
{$location_id}";
-                       }
-
                        if ($query)
                        {
                                $query = $this->db->db_addslashes($query);




reply via email to

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