phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: admin/inc class.boaccounts.inc.php, 1.22.2.7.2.3


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: admin/inc class.boaccounts.inc.php, 1.22.2.7.2.3, 1.22.2.7.2.4 class.uiaccounts.inc.php, 1.23.2.9.2.13, 1.23.2.9.2.14
Date: Mon, 18 Aug 2003 19:43:50 -0400

Update of /cvsroot/phpgroupware/admin/inc
In directory subversions:/tmp/cvs-serv22147

Modified Files:
      Tag: Version-0_9_16-branch
        class.boaccounts.inc.php class.uiaccounts.inc.php 
Log Message:
added the jsCalendar to the user-manager


Index: class.boaccounts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.boaccounts.inc.php,v
retrieving revision 1.22.2.7.2.3
retrieving revision 1.22.2.7.2.4
diff -C2 -r1.22.2.7.2.3 -r1.22.2.7.2.4
*** class.boaccounts.inc.php    12 Aug 2003 22:09:26 -0000      1.22.2.7.2.3
--- class.boaccounts.inc.php    18 Aug 2003 23:43:48 -0000      1.22.2.7.2.4
***************
*** 323,332 ****
                                        'homedirectory'         => 
$_POST['homedirectory'],
                                        'loginshell'            => 
$_POST['loginshell'],
-                                       'account_expires_month' => 
$_POST['account_expires_month'],
-                                       'account_expires_day'   => 
$_POST['account_expires_day'],
-                                       'account_expires_year'  => 
$_POST['account_expires_year'],
                                        'account_expires_never' => 
$_POST['never_expires']
                                        /* 'file_space' => 
$_POST['account_file_space_number'] . "-" . $_POST['account_file_space_type'] */
                                );
  
                                if (!$errors = $this->validate_user($userData))
--- 323,331 ----
                                        'homedirectory'         => 
$_POST['homedirectory'],
                                        'loginshell'            => 
$_POST['loginshell'],
                                        'account_expires_never' => 
$_POST['never_expires']
                                        /* 'file_space' => 
$_POST['account_file_space_number'] . "-" . $_POST['account_file_space_type'] */
                                );
+                               $jscal = 
CreateObject('phpgwapi.jscalendar',False);
+                               $userData += 
$jscal->input2date($_POST['expires'],False,'account_expires_day','account_expires_month','account_expires_year');
  
                                if (!$errors = $this->validate_user($userData))
***************
*** 562,571 ****
                                        'homedirectory'         => 
$_POST['homedirectory'],
                                        'loginshell'            => 
$_POST['loginshell'],
-                                       'account_expires_month' => 
$_POST['account_expires_month'],
-                                       'account_expires_day'   => 
$_POST['account_expires_day'],
-                                       'account_expires_year'  => 
$_POST['account_expires_year'],
                                        'account_expires_never' => 
$_POST['never_expires']
                                        /* 'file_space' => 
$_POST['account_file_space_number'] . "-" . $_POST['account_file_space_type'] */
                                );
                                if (!$errors = $this->validate_user($userData))
                                {
--- 561,570 ----
                                        'homedirectory'         => 
$_POST['homedirectory'],
                                        'loginshell'            => 
$_POST['loginshell'],
                                        'account_expires_never' => 
$_POST['never_expires']
                                        /* 'file_space' => 
$_POST['account_file_space_number'] . "-" . $_POST['account_file_space_type'] */
                                );
+                               $jscal = 
CreateObject('phpgwapi.jscalendar',False);
+                               $userData += 
$jscal->input2date($_POST['expires'],False,'account_expires_day','account_expires_month','account_expires_year');
+ 
                                if (!$errors = $this->validate_user($userData))
                                {

Index: class.uiaccounts.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/admin/inc/class.uiaccounts.inc.php,v
retrieving revision 1.23.2.9.2.13
retrieving revision 1.23.2.9.2.14
diff -C2 -r1.23.2.9.2.13 -r1.23.2.9.2.14
*** class.uiaccounts.inc.php    18 Jun 2003 10:20:46 -0000      1.23.2.9.2.13
--- class.uiaccounts.inc.php    18 Aug 2003 23:43:48 -0000      1.23.2.9.2.14
***************
*** 933,936 ****
--- 933,937 ----
                {
                        $sbox = createobject('phpgwapi.sbox');
+                       $jscal = CreateObject('phpgwapi.jscalendar');
  
                        unset($GLOBALS['phpgw_info']['flags']['noheader']);
***************
*** 991,1009 ****
                                }
                                $allGroups = $account->get_list('groups');
- 
-                               if ($userData['expires'] == -1)
-                               {
-                                       $userData['account_expires_month'] = 0;
-                                       $userData['account_expires_day']   = 0;
-                                       $userData['account_expires_year']  = 0;
-                               }
-                               else
-                               {
-                                       /* Change this to be an admin/setup 
setting.  For now, default to expire one week from today. */
-                                       $time_var = time() + (60*60*24*7);
-                                       $userData['account_expires_month'] = 
date('m',$userData['expires'] > 0 ? $userData['expires'] : $time_var);
-                                       $userData['account_expires_day']   = 
date('d',$userData['expires'] > 0 ? $userData['expires'] : $time_var);
-                                       $userData['account_expires_year']  = 
date('Y',$userData['expires'] > 0 ? $userData['expires'] : $time_var);
-                               }                       
                        }
                        $page_params['menuaction'] = 
'admin.boaccounts.'.($_account_id?'edit':'add').'_user';
--- 992,995 ----
***************
*** 1054,1062 ****
                                $loginshell = '';
                        }
- 
-                       $_y = 
$sbox->getyears('account_expires_year',$userData['account_expires_year'],date('Y'),date('Y')+10);
-                       $_m = 
$sbox->getmonthtext('account_expires_month',$userData['account_expires_month']);
-                       $_d = 
$sbox->getdays('account_expires_day',$userData['account_expires_day']);
- 
                        $account_file_space = '';
                /*
--- 1040,1043 ----
***************
*** 1086,1092 ****
                        $t->set_var($var);
                */
- 
                        $var = Array(
!                               'input_expires' => 
$GLOBALS['phpgw']->common->dateformatorder($_y,$_m,$_d,True),
                                'lang_never'    => lang('Never'),
                                'account_lid'   => '<input name="account_lid" 
value="' . $userData['account_lid'] . '">',
--- 1067,1072 ----
                        $t->set_var($var);
                */
                        $var = Array(
!                               'input_expires' => 
$jscal->input('expires',$userData['expires']<0?'':($userData['expires']?$userData['expires']:time()+(60*60*24*7))),
                                'lang_never'    => lang('Never'),
                                'account_lid'   => '<input name="account_lid" 
value="' . $userData['account_lid'] . '">',





reply via email to

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