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.15, 1.1.2.16 class.p


From: Dan Kuykendall <address@hidden>
Subject: [Phpgroupware-cvs] api class.account_mgr.php, 1.1.2.15, 1.1.2.16 class.phpgw.php, 1.1.1.1.2.31, 1.1.1.1.2.32 class.statecache.php, 1.1.2.2, 1.1.2.3 starter.inc.php, 1.1.1.1.2.21, 1.1.1.1.2.22
Date: Mon, 03 Nov 2003 20:21:44 +0000

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

Modified Files:
      Tag: proposal-branch
        class.account_mgr.php class.phpgw.php class.statecache.php 
        starter.inc.php 
Log Message:
state cache now fully working

Index: class.account_mgr.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/Attic/class.account_mgr.php,v
retrieving revision 1.1.2.15
retrieving revision 1.1.2.16
diff -C2 -d -r1.1.2.15 -r1.1.2.16
*** class.account_mgr.php       3 Nov 2003 13:20:35 -0000       1.1.2.15
--- class.account_mgr.php       3 Nov 2003 20:21:41 -0000       1.1.2.16
***************
*** 107,111 ****
                {
                        $result['accounts'] = 
$GLOBALS['phpgw']->accounts->list_repository();
! 
                        return $result;
                }
--- 107,111 ----
                {
                        $result['accounts'] = 
$GLOBALS['phpgw']->accounts->list_repository();
!                       $result['action_type'] = 'accounts';
                        return $result;
                }
***************
*** 125,129 ****
                        $GLOBALS['phpgw']->add_xsl('api.account_mgr');
  
!                       $result['add_account'] = array(
                                'account_lid'       => $args['account_lid'],
                                'account_firstname' => 
$args['account_firstname'],
--- 125,129 ----
                        $GLOBALS['phpgw']->add_xsl('api.account_mgr');
  
!                       $result = array(
                                'account_lid'       => $args['account_lid'],
                                'account_firstname' => 
$args['account_firstname'],
***************
*** 132,140 ****
  
                        // Yes, this is supposed to be a string, NOT a boolean 
value
                        if ($args['create_account_submit'] == 'True')
                        {
                                if (! strlen($args['account_lid']))
                                {
!                                       
$result['add_account']['missing_fields']['account_lid'] = True;
                                        $missing_fields = True;
                                }
--- 132,141 ----
  
                        // Yes, this is supposed to be a string, NOT a boolean 
value
+                       $result['action_type'] = 'add_account';
                        if ($args['create_account_submit'] == 'True')
                        {
                                if (! strlen($args['account_lid']))
                                {
!                                       
$result['missing_fields']['account_lid'] = True;
                                        $missing_fields = True;
                                }
***************
*** 142,146 ****
                                if (! strlen($args['account_firstname']))
                                {
!                                       
$result['add_account']['missing_fields']['account_firstname'] = True;
                                        $missing_fields = True;
                                }
--- 143,147 ----
                                if (! strlen($args['account_firstname']))
                                {
!                                       
$result['missing_fields']['account_firstname'] = True;
                                        $missing_fields = True;
                                }
***************
*** 148,152 ****
                                if (! strlen($args['account_lastname']))
                                {
!                                       
$result['add_account']['missing_fields']['account_lastname'] = True;
                                        $missing_fields = True;
                                }
--- 149,153 ----
                                if (! strlen($args['account_lastname']))
                                {
!                                       
$result['missing_fields']['account_lastname'] = True;
                                        $missing_fields = True;
                                }
***************
*** 154,158 ****
                                if (! strlen($args['account_password']))
                                {
!                                       
$result['add_account']['missing_fields']['account_password'] = True;
                                        $missing_fields = True;
                                }
--- 155,159 ----
                                if (! strlen($args['account_password']))
                                {
!                                       
$result['missing_fields']['account_password'] = True;
                                        $missing_fields = True;
                                }
***************
*** 160,170 ****
                                if (! strlen($args['account_password_confirm']))
                                {
!                                       
$result['add_account']['missing_fields']['account_password_confirm'] = True;
                                        $missing_fields = True;
                                }
                                else if ($args['account_password'] != 
$args['account_password_confirm'])
                                {
!                                       
$result['add_account']['missing_fields']['account_password']         = True;
!                                       
$result['add_account']['missing_fields']['account_password_confirm'] = True;
                                        $GLOBALS['msgbox']->add(lang('The 
passwords you entered do not match'),__LINE__,__FILE__, 'notice');
  
--- 161,171 ----
                                if (! strlen($args['account_password_confirm']))
                                {
!                                       
$result['missing_fields']['account_password_confirm'] = True;
                                        $missing_fields = True;
                                }
                                else if ($args['account_password'] != 
$args['account_password_confirm'])
                                {
!                                       
$result['missing_fields']['account_password']         = True;
!                                       
$result['missing_fields']['account_password_confirm'] = True;
                                        $GLOBALS['msgbox']->add(lang('The 
passwords you entered do not match'),__LINE__,__FILE__, 'notice');
  
***************
*** 207,213 ****
                        $accounts               = 
CreateObject('api_accounts',$args);
                        $data                   = $accounts->data;
!                       $data['expires']        = 
strftime('%x',$data['expires']) . date(' H:i:s a',$data['expires']);
  
!                       $result['view_account'] = $data;
  
                        return $result;
--- 208,214 ----
                        $accounts               = 
CreateObject('api_accounts',$args);
                        $data                   = $accounts->data;
!                       $result['expires']        = 
strftime('%x',$data['expires']) . date(' H:i:s a',$data['expires']);
  
!                       $result['action_type'] = 'view_account';
  
                        return $result;

Index: starter.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/starter.inc.php,v
retrieving revision 1.1.1.1.2.21
retrieving revision 1.1.1.1.2.22
diff -C2 -d -r1.1.1.1.2.21 -r1.1.1.1.2.22
*** starter.inc.php     3 Nov 2003 19:11:28 -0000       1.1.1.1.2.21
--- starter.inc.php     3 Nov 2003 20:21:42 -0000       1.1.1.1.2.22
***************
*** 216,222 ****
        if($methodname == 'api.statecache.pause')
        {
!               $result = $GLOBALS['phpgw']->statecache->pause($inputs);
!               $methodname = $GLOBALS['phpgw_data']['api']['prevop'];
!               $inputs = array();
        }
        
--- 216,230 ----
        if($methodname == 'api.statecache.pause')
        {
!               $GLOBALS['phpgw']->statecache->pause($inputs);
!               $num = 
count($GLOBALS['phpgw_session']['phpgw_data']['op_history']) - 2;
!               $methodname = 
$GLOBALS['phpgw_session']['phpgw_data']['op_history'][$num]['op'];
!               $inputs = 
$GLOBALS['phpgw_session']['phpgw_data']['op_history'][$num]['data'];
!       }
!       elseif($methodname == 'api.statecache.clear')
!       {
!               $GLOBALS['phpgw']->statecache->clear();
!               $num = 
count($GLOBALS['phpgw_session']['phpgw_data']['op_history']) - 2;
!               $methodname = 
$GLOBALS['phpgw_session']['phpgw_data']['op_history'][$num]['op'];
!               $inputs = 
$GLOBALS['phpgw_session']['phpgw_data']['op_history'][$num]['data'];
        }
        

Index: class.statecache.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/Attic/class.statecache.php,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -C2 -d -r1.1.2.2 -r1.1.2.3
*** class.statecache.php        3 Nov 2003 19:11:28 -0000       1.1.2.2
--- class.statecache.php        3 Nov 2003 20:21:42 -0000       1.1.2.3
***************
*** 38,47 ****
                }
                
!               function pause ()
                {
!                       $inputs = func_get_args();
                        if (isset($GLOBALS['phpgw_data']['api']['prevop']))
                        {
!                               
$this->data[$GLOBALS['phpgw_data']['api']['prevop']] = $inputs[0];
                        }
                }
--- 38,50 ----
                }
                
!               function pause ($inputs = '##NOTSET##')
                {
!                       if($inputs == '##NOTSET##')
!                       {
!                               $inputs = array();
!                       }
                        if (isset($GLOBALS['phpgw_data']['api']['prevop']))
                        {
!                               
$this->data[$GLOBALS['phpgw_data']['api']['prevop']] = $inputs;
                        }
                }
***************
*** 49,73 ****
                function restore ($inputs = '##NOTSET##')
                {
!                       if($inputs == '##NOTSET##')
!                       {
!                               $inputs = array();
!                       }
!                       
if(isset($this->data[$GLOBALS['phpgw_data']['api']['op']]))
                        {
!                               return array_merge($inputs, 
$this->data[$GLOBALS['phpgw_data']['api']['op']]);
                        }
!                       else
                        {
!                               return $inputs;
                        }
                }
  
                function clear ()
                {
!                       
if(isset($this->data[$GLOBALS['phpgw_data']['api']['op']]))
                        {
!                               
unset($this->data[$GLOBALS['phpgw_data']['api']['op']]);
                        }
-                       return func_get_args();
                }
        }
--- 52,73 ----
                function restore ($inputs = '##NOTSET##')
                {
!                       
if(!isset($this->data[$GLOBALS['phpgw_data']['api']['op']]))
                        {
!                               return $inputs;
                        }
!                       
!                       if($inputs == '##NOTSET##')
                        {
!                               $inputs = array();
                        }
+                       return array_merge($inputs, 
$this->data[$GLOBALS['phpgw_data']['api']['op']]);
                }
  
                function clear ()
                {
!                       
if(isset($this->data[$GLOBALS['phpgw_data']['api']['prevop']]))
                        {
!                               
unset($this->data[$GLOBALS['phpgw_data']['api']['prevop']]);
                        }
                }
        }

Index: class.phpgw.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/class.phpgw.php,v
retrieving revision 1.1.1.1.2.31
retrieving revision 1.1.1.1.2.32
diff -C2 -d -r1.1.1.1.2.31 -r1.1.1.1.2.32
*** class.phpgw.php     3 Nov 2003 19:11:27 -0000       1.1.1.1.2.31
--- class.phpgw.php     3 Nov 2003 20:21:41 -0000       1.1.1.1.2.32
***************
*** 279,284 ****
                        // Don't add login, or if the last op is a duplicate
                        if ($GLOBALS['phpgw_data']['api']['op'] != 
'api.base.login'
!                               && $GLOBALS['phpgw_data']['api']['op'] != 
'api.base.form_clear'
!                               && $GLOBALS['phpgw_data']['api']['op'] != 
'api.base.form_pause'
                                && 
$GLOBALS['phpgw_session']['phpgw_data']['op_history'][count($GLOBALS['phpgw_session']['phpgw_data']['op_history'])
 - 1]['op'] != $GLOBALS['phpgw_data']['api']['op'])
                        {
--- 279,284 ----
                        // Don't add login, or if the last op is a duplicate
                        if ($GLOBALS['phpgw_data']['api']['op'] != 
'api.base.login'
!                               && $GLOBALS['phpgw_data']['api']['op'] != 
'api.statecache.clear'
!                               && $GLOBALS['phpgw_data']['api']['op'] != 
'api.statecache.pause'
                                && 
$GLOBALS['phpgw_session']['phpgw_data']['op_history'][count($GLOBALS['phpgw_session']['phpgw_data']['op_history'])
 - 1]['op'] != $GLOBALS['phpgw_data']['api']['op'])
                        {





reply via email to

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