[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] [20962] improvement: get ticket as assigned or via gr
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] [20962] improvement: get ticket as assigned or via group |
Date: |
Wed, 13 Jan 2010 22:37:08 +0000 |
Revision: 20962
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=20962
Author: sigurdne
Date: 2010-01-13 22:37:07 +0000 (Wed, 13 Jan 2010)
Log Message:
-----------
improvement: get ticket as assigned or via group
Modified Paths:
--------------
people/sigurdne/modules/property/trunk/inc/class.sotts.inc.php
Modified: people/sigurdne/modules/property/trunk/inc/class.sotts.inc.php
===================================================================
--- people/sigurdne/modules/property/trunk/inc/class.sotts.inc.php
2010-01-13 19:47:19 UTC (rev 20961)
+++ people/sigurdne/modules/property/trunk/inc/class.sotts.inc.php
2010-01-13 22:37:07 UTC (rev 20962)
@@ -65,7 +65,7 @@
{
$start = isset($data['start'])
&& $data['start'] ? $data['start']:0;
$status_id = isset($data['status_id']) &&
$data['status_id'] ? $data['status_id']:'O'; //O='Open'
- $user_id =
isset($data['user_id'])?$data['user_id']:'';
+ $user_id = isset($data['user_id']) &&
$data['user_id'] ? (int)$data['user_id']: 0;
$owner_id =
isset($data['owner_id'])?$data['owner_id']:'';
$query =
isset($data['query'])?$data['query']:'';
$sort = isset($data['sort'])
&& $data['sort'] ? $data['sort']:'DESC';
@@ -197,8 +197,11 @@
if ($user_id > 0)
{
- $filtermethod .= " $where assignedto=" .
(int)$user_id;
+ $filtermethod .= " {$where}
(assignedto={$user_id}";
$where = 'AND';
+
+ $membership =
$GLOBALS['phpgw']->accounts->membership($user_id);
+ $filtermethod .= ' OR (assignedto IS NULL AND
group_id IN (' . implode(',',array_keys($membership)) . ')))';
}
if ($owner_id > 0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] [20962] improvement: get ticket as assigned or via group,
Sigurd Nes <=