[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: setup/inc functions.inc.php,1.42,1.43
From: |
Miles Lott <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: setup/inc functions.inc.php,1.42,1.43 |
Date: |
Fri, 08 Feb 2002 01:07:48 -0500 |
Update of /cvsroot/phpgroupware/setup/inc
In directory subversions:/tmp/cvs-serv27111
Modified Files:
functions.inc.php
Log Message:
Update get_account_id()
Index: functions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/inc/functions.inc.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -r1.42 -r1.43
*** functions.inc.php 14 Jan 2002 12:14:40 -0000 1.42
--- functions.inc.php 8 Feb 2002 06:07:46 -0000 1.43
***************
*** 89,95 ****
define('SEP',filesystem_separator());
function get_account_id($account_id = '',$default_id = '')
{
! if (gettype($account_id) == 'integer')
{
return $account_id;
--- 89,105 ----
define('SEP',filesystem_separator());
+ /*!
+ @function get_account_id
+ @abstract Return a properly formatted account_id.
+ @author skeeter
+ @discussion This function will return a properly formatted account_id.
This can take either a name or an account_id as paramters. If a name is
provided it will return the associated id.
+ @syntax get_account_id($accountid);
+ @example $account_id = get_account_id($accountid);
+ @param $account_id either a name or an id
+ @param $default_id either a name or an id
+ */
function get_account_id($account_id = '',$default_id = '')
{
! if (is_int($account_id))
{
return $account_id;
***************
*** 99,105 ****
if ($default_id == '')
{
! return
$GLOBALS['phpgw_info']['user']['account_id'];
}
! elseif (gettype($default_id) == 'string')
{
return
$GLOBALS['phpgw']->accounts->name2id($default_id);
--- 109,115 ----
if ($default_id == '')
{
! return
(isset($GLOBALS['phpgw_info']['user']['account_id'])?$GLOBALS['phpgw_info']['user']['account_id']:0);
}
! elseif (is_string($default_id))
{
return
$GLOBALS['phpgw']->accounts->name2id($default_id);
***************
*** 107,111 ****
return intval($default_id);
}
! elseif (gettype($account_id) == 'string')
{
if($GLOBALS['phpgw']->accounts->exists(intval($account_id)) == True)
--- 117,121 ----
return intval($default_id);
}
! elseif (is_string($account_id))
{
if($GLOBALS['phpgw']->accounts->exists(intval($account_id)) == True)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: setup/inc functions.inc.php,1.42,1.43,
Miles Lott <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: brewer/inc class.brew.inc.php,1.5,1.6 class.recipe.inc.php,1.7,1.8 class.std.inc.php,1.6,1.7
- Next by Date:
[Phpgroupware-cvs] CVS: wcm/templates/default listpages.tpl,1.1.1.1,1.2
- Previous by thread:
[Phpgroupware-cvs] CVS: brewer/inc class.brew.inc.php,1.5,1.6 class.recipe.inc.php,1.7,1.8 class.std.inc.php,1.6,1.7
- Next by thread:
[Phpgroupware-cvs] CVS: wcm/templates/default listpages.tpl,1.1.1.1,1.2
- Index(es):