[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] api/class.prefs.php, 1.1.1.1.2.17
From: |
nomail |
Subject: |
[Phpgroupware-cvs] api/class.prefs.php, 1.1.1.1.2.17 |
Date: |
Sat, 15 May 2004 09:49:25 +0200 |
Update of /api
Modified Files:
Branch: proposal-branch
class.prefs.php
date: 2004/05/15 07:49:25; author: jengo; state: Exp; lines: +16 -8
Log Message:
You can now pass an account_id to _display_account_fullname()
=====================================================================
Index: api/class.prefs.php
diff -u api/class.prefs.php:1.1.1.1.2.16 api/class.prefs.php:1.1.1.1.2.17
--- api/class.prefs.php:1.1.1.1.2.16 Sat May 15 07:38:40 2004
+++ api/class.prefs.php Sat May 15 07:49:25 2004
@@ -240,14 +240,22 @@
function _display_account_fullname()
{
$args = new safe_args();
- $args->set('loginid',NOVAR);
+ $args->set('id',NOVAR);
$args->set('firstname',NOVAR);
$args->set('lastname',NOVAR);
extract($args->get(func_get_args()));
- if ($loginid == NOVAR && $firstname == NOVAR &&
$lastname == NOVAR)
+ if (sanitize($id,'number'))
{
- $loginid =
$GLOBALS['phpgw_data']['user']['loginid'];
+ $obj = createObject('api_accounts',$id);
+ $id = $obj->data['lid'];
+ $firstname = $obj->data['firstname'];
+ $lastname = $obj->data['lastname'];
+ }
+
+ if ($id == NOVAR && $firstname == NOVAR && $lastname ==
NOVAR)
+ {
+ $id =
$GLOBALS['phpgw_data']['user']['id'];
$firstname =
$GLOBALS['phpgw_data']['user']['firstname'];
$lastname =
$GLOBALS['phpgw_data']['user']['lastname'];
}
@@ -270,18 +278,18 @@
switch
($GLOBALS['phpgw_data']['prefs']['api.account_display'])
{
case 'all':
- if ($loginid)
+ if ($id)
{
- $name = '[' . $loginid . '] ';
+ $name = '[' . $id . '] ';
}
// fall-through
case 'lastname':
$name .= implode(', ',$a);
break;
case 'firstall':
- if ($loginid)
+ if ($id)
{
- $name = ' [' . $loginid . ']';
+ $name = ' [' . $id . ']';
}
// fall-through
case 'firstname':
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] api/class.prefs.php, 1.1.1.1.2.17,
nomail <=