phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] api class.account_mgr.php, 1.1.2.6, 1.1.2.7 class.pre


From: Joseph Engo <address@hidden>
Subject: [Phpgroupware-cvs] api class.account_mgr.php, 1.1.2.6, 1.1.2.7 class.prefs.php, 1.1.1.1.2.1, 1.1.1.1.2.2
Date: Tue, 28 Oct 2003 05:26:39 +0000

Update of /cvsroot/phpgroupware/api
In directory subversions:/tmp/cvs-serv29810/api

Modified Files:
      Tag: proposal-branch
        class.account_mgr.php class.prefs.php 
Log Message:
- Account view now shows account_expires in a more human readable format
- Added temp date conversion functions to preferences


Index: class.account_mgr.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/Attic/class.account_mgr.php,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -C2 -d -r1.1.2.6 -r1.1.2.7
*** class.account_mgr.php       27 Oct 2003 19:25:33 -0000      1.1.2.6
--- class.account_mgr.php       28 Oct 2003 05:26:34 -0000      1.1.2.7
***************
*** 144,148 ****
                        $args['account']        = $args['account_id'];
                        $accounts               = 
CreateObject('api_accounts',$args);
!                       $result['view_account'] = $accounts->data;
  
                        return $result;
--- 144,151 ----
                        $args['account']        = $args['account_id'];
                        $accounts               = 
CreateObject('api_accounts',$args);
!                       $data                   = $accounts->data;
!                       $data['expires']        = ($date['expires'] < 
2145800000 ? 'Never' : 
$GLOBALS['phpgw']->prefs->get_datetime($data['expires']));
! 
!                       $result['view_account'] = $data;
  
                        return $result;

Index: class.prefs.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/class.prefs.php,v
retrieving revision 1.1.1.1.2.1
retrieving revision 1.1.1.1.2.2
diff -C2 -d -r1.1.1.1.2.1 -r1.1.1.1.2.2
*** class.prefs.php     24 Oct 2003 22:09:44 -0000      1.1.1.1.2.1
--- class.prefs.php     28 Oct 2003 05:26:34 -0000      1.1.1.1.2.2
***************
*** 152,154 ****
--- 152,184 ----
                        $GLOBALS['phpgw_data']['prefs'] = 
array_merge($this->data['phpgw_default'], $this->data[$this->account_id], 
$this->data['phpgw_forced']);
                }
+ 
+               // FIXME: These are hard coded for now, they are going to be 
replaced with the datetime classes from current phpGW (jengo)
+               function get_date()
+               {
+                       $args = new safe_args();
+                       $args->set('epoch','##REQUIRED##','int');
+                       $args = $args->get(func_get_args(),__LINE__,__FILE__);
+ 
+                       return date('m/d/Y',$args['epoch']);
+               }
+ 
+               function get_time()
+               {
+                       $args = new safe_args();
+                       $args->set('epoch','##REQUIRED##','int');
+                       $args = $args->get(func_get_args(),__LINE__,__FILE__);
+ 
+                       return date('H:i:s a',$args['epoch']);
+               }
+ 
+               function get_datetime()
+               {
+                       $args = new safe_args();
+                       $args->set('epoch','##REQUIRED##','int');
+                       $args = $args->get(func_get_args(),__LINE__,__FILE__);
+ 
+                       return date('m/d/Y H:i:s a',$args['epoch']);
+               }
        }
+ 
+ 





reply via email to

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