[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] api/accounts/class.accounts_sql.php, 1.1.1.1.2.23
From: |
nomail |
Subject: |
[Phpgroupware-cvs] api/accounts/class.accounts_sql.php, 1.1.1.1.2.23 |
Date: |
Sat, 3 Jul 2004 10:48:18 +0200 |
Update of /api/accounts
Modified Files:
Branch: proposal-branch
class.accounts_sql.php
date: 2004/07/03 08:48:18; author: jengo; state: Exp; lines: +14 -1
Log Message:
Added parameter to disable returning a list of users containing the current
user. (Note: This needs to be done for groups as well)
=====================================================================
Index: api/accounts/class.accounts_sql.php
diff -u api/accounts/class.accounts_sql.php:1.1.1.1.2.22
api/accounts/class.accounts_sql.php:1.1.1.1.2.23
--- api/accounts/class.accounts_sql.php:1.1.1.1.2.22 Sat Jul 3 02:33:42 2004
+++ api/accounts/class.accounts_sql.php Sat Jul 3 08:48:18 2004
@@ -165,6 +165,7 @@
$args->set('order',NOTSET,'any');
$args->set('query',NOTSET,'any');
$args->set('offset',-1,'any');
+ $args->set('list_current_user',true,'bool');
$args = $args->get(func_get_args());
if ($args['order'])
@@ -180,12 +181,24 @@
{
case 'accounts':
$whereclause = "WHERE account_type =
'u'";
+ if (! $args['list_current_user'])
+ {
+ $whereclause .= ' AND
account_id != ' . $this->account_id;
+ }
break;
case 'groups':
$whereclause = "WHERE account_type =
'g'";
+ if (! $args['list_current_user'])
+ {
+ $whereclause .= ' AND
account_id != ' . $this->account_id;
+ }
break;
default:
$whereclause = '';
+ if (! $args['list_current_user'])
+ {
+ $whereclause .= 'WHERE
account_id != ' . $this->account_id;
+ }
}
if ($args['query'])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] api/accounts/class.accounts_sql.php, 1.1.1.1.2.23,
nomail <=