phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] api class.phpgw.php, 1.1.1.1.2.30, 1.1.1.1.2.31 class


From: Dan Kuykendall <address@hidden>
Subject: [Phpgroupware-cvs] api class.phpgw.php, 1.1.1.1.2.30, 1.1.1.1.2.31 class.statecache.php, 1.1.2.1, 1.1.2.2 starter.inc.php, 1.1.1.1.2.20, 1.1.1.1.2.21
Date: Mon, 03 Nov 2003 19:11:31 +0000

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

Modified Files:
      Tag: proposal-branch
        class.phpgw.php class.statecache.php starter.inc.php 
Log Message:
added initial statecache class

Index: starter.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/starter.inc.php,v
retrieving revision 1.1.1.1.2.20
retrieving revision 1.1.1.1.2.21
diff -C2 -d -r1.1.1.1.2.20 -r1.1.1.1.2.21
*** starter.inc.php     3 Nov 2003 17:31:21 -0000       1.1.1.1.2.20
--- starter.inc.php     3 Nov 2003 19:11:28 -0000       1.1.1.1.2.21
***************
*** 205,208 ****
--- 205,209 ----
        
\**************************************************************************/
        $inputs = $GLOBALS['phpgw']->interface->get_inputs();
+       unset($inputs['phpgw_data'], $inputs['serialized_classes']);
  
        
/**************************************************************************\
***************
*** 213,226 ****
        $result = array();
  
        if($GLOBALS['missing_critical'] || 
$GLOBALS['phpgw']->acl->check($methodname, 1))
        {
!               $GLOBALS['performance_timer']->start($methodname);              
        
                $result = ExecMethod($methodname,$inputs);
-               if 
(isset($GLOBALS['phpgw_session']['form_state_values'][$methodname]) && ! 
isset($result['form_state_values']))
-               {
-                       $result['form_state_values'] = 
$GLOBALS['phpgw_session']['form_state_values'][$methodname];
-               }
- 
-               /* If the method doesnt exist, then we try and handle the 
situation nicely (and quietly). */
                if($result == '##NOMETHOD##')
                {
--- 214,228 ----
        $result = array();
  
+       if($methodname == 'api.statecache.pause')
+       {
+               $result = $GLOBALS['phpgw']->statecache->pause($inputs);
+               $methodname = $GLOBALS['phpgw_data']['api']['prevop'];
+               $inputs = array();
+       }
+       
        if($GLOBALS['missing_critical'] || 
$GLOBALS['phpgw']->acl->check($methodname, 1))
        {
!               $GLOBALS['performance_timer']->start($methodname);
                $result = ExecMethod($methodname,$inputs);
                if($result == '##NOMETHOD##')
                {

Index: class.statecache.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/Attic/class.statecache.php,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** class.statecache.php        3 Nov 2003 18:19:50 -0000       1.1.2.1
--- class.statecache.php        3 Nov 2003 19:11:28 -0000       1.1.2.2
***************
*** 40,60 ****
                function pause ()
                {
!                       $args = $args->get(func_get_args(),__LINE__,__FILE__);
!                       
                        if (isset($GLOBALS['phpgw_data']['api']['prevop']))
                        {
!                               
$this->data[$GLOBALS['phpgw_data']['api']['prevop']] = func_get_args();
                        }
                }
                
!               function restore ()
                {
                        
if(isset($this->data[$GLOBALS['phpgw_data']['api']['op']]))
                        {
!                               return array_merge(func_get_args(), 
$this->data[$GLOBALS['phpgw_data']['api']['op']]);
                        }
                        else
                        {
!                               return func_get_args();
                        }
                }
--- 40,63 ----
                function pause ()
                {
!                       $inputs = func_get_args();
                        if (isset($GLOBALS['phpgw_data']['api']['prevop']))
                        {
!                               
$this->data[$GLOBALS['phpgw_data']['api']['prevop']] = $inputs[0];
                        }
                }
                
!               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;
                        }
                }

Index: class.phpgw.php
===================================================================
RCS file: /cvsroot/phpgroupware/api/class.phpgw.php,v
retrieving revision 1.1.1.1.2.30
retrieving revision 1.1.1.1.2.31
diff -C2 -d -r1.1.1.1.2.30 -r1.1.1.1.2.31
*** class.phpgw.php     3 Nov 2003 17:31:21 -0000       1.1.1.1.2.30
--- class.phpgw.php     3 Nov 2003 19:11:27 -0000       1.1.1.1.2.31
***************
*** 41,44 ****
--- 41,45 ----
                var $prefs;
                var $lang;
+               var $statecache;
  
                var $base_xml;
***************
*** 145,148 ****
--- 146,151 ----
                                $this->apps->fill_phpgw_data();
                                $GLOBALS['performance_timer']->stop('api_apps');
+ 
+                               $this->statecache = recoverobject('statecache', 
'api_statecache');
                                $this->base_classes_loaded = True;
                        }
***************
*** 394,404 ****
                        saveobject($this->prefs, 'prefs');
                        saveobject($this->apps, 'apps');
!                       /*
!                       $myvars = get_object_vars($this);
!                       foreach($myvars as $key=>$val)
!                       {
!                               saveobject($val, $key);
!                       }
!                       */
                        $GLOBALS['performance_timer']->stop('cache_classes');
                        /* Before we send output, save the session data */
--- 397,401 ----
                        saveobject($this->prefs, 'prefs');
                        saveobject($this->apps, 'apps');
!                       saveobject($this->statecache, 'statecache');
                        $GLOBALS['performance_timer']->stop('cache_classes');
                        /* Before we send output, save the session data */





reply via email to

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