phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: setup/inc class.setup.inc.php,1.18,1.19


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: setup/inc class.setup.inc.php,1.18,1.19
Date: Sun, 13 Jan 2002 12:20:35 -0500

Update of /cvsroot/phpgroupware/setup/inc
In directory subversions:/tmp/cvs-serv20851/inc

Modified Files:
        class.setup.inc.php 
Log Message:
This will now clear system/user level cache when adding/deleting apps.

Index: class.setup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/setup/inc/class.setup.inc.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** class.setup.inc.php 11 Jan 2002 03:40:59 -0000      1.18
--- class.setup.inc.php 13 Jan 2002 17:20:33 -0000      1.19
***************
*** 193,196 ****
--- 193,218 ----
  
                /*!
+               @function clear_session_cache
+               @abstract Clear system/user level cache so as to have it 
rebuilt with the next access
+               @param  None
+               */
+               function clear_session_cache()
+               {
+                       
+                       $tablenames = @$this->db->table_names();
+                       while(list($key,$val) = @each($tablenames))
+                       {
+                               $tables[] = $val['table_name'];
+                       }
+                       if ($this->isinarray('phpgw_app_sessions',$tables))
+                       {
+                               $this->db->lock(array('phpgw_app_sessions'));
+                               @$this->db->query("DELETE FROM 
phpgw_app_sessions WHERE sessionid = '0' and loginid = '0' and app = 'phpgwapi' 
and location = 'config'",__LINE__,__FILE__);
+                               @$this->db->query("DELETE FROM 
phpgw_app_sessions WHERE app = 'phpgwapi' and location = 
'phpgw_info_cache'",__LINE__,__FILE__);
+                               $this->db->unlock();
+                       }
+               }
+ 
+               /*!
                @function register_app
                @abstract Add an application to the phpgw_applications table
***************
*** 269,272 ****
--- 291,295 ----
                                        . "'" . 
$setup_info[$appname]['version'] . "');"
                                );
+                               $this->clear_session_cache();
                        }
                }
***************
*** 436,439 ****
--- 459,463 ----
                        //echo 'DELETING application: ' . $appname;
                        $this->db->query("DELETE FROM $appstbl WHERE 
app_name='". $appname ."'");
+                       $this->clear_session_cache();
                }
  




reply via email to

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