phpgroupware-cvs
[Top][All Lists]
Advanced

[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)




reply via email to

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