From: max
Date: Wed May 30 11:08:54 2001
Modified files:
      php-lib/php/session/session4_custom.inc

Log message:
1. A typo.
2. Changed delete() to del(), do not use this function explicitly, 
it should be only used as the delete callback of the custom handler. Use the
inherited delete() instead to actually destroy the session.

Index: php-lib/php/session/session4_custom.inc
diff -u php-lib/php/session/session4_custom.inc:1.9 
php-lib/php/session/session4_custom.inc:1.10
--- php-lib/php/session/session4_custom.inc:1.9 Tue May 29 17:14:58 2001
+++ php-lib/php/session/session4_custom.inc     Wed May 30 11:08:53 2001
@@ -10,11 +10,11 @@
  * some of the code taken from Teodor Cimpoesu's session4 class
  * Copyright (c) 2000 Teodor Cimpoesu <[EMAIL PROTECTED]>
  *
- * $Id: session4_custom.inc,v 1.9 2001/05/29 15:14:58 uw Exp $
+ * $Id: session4_custom.inc,v 1.10 2001/05/30 09:08:53 max Exp $
  *
  */ 
 
-class Session4_Custom extens Session4 {
+class Session4_Custom extends Session4 {
 
   /**
   *
@@ -114,7 +114,6 @@
   }
 
   
-  // the following functions used in session_set_save_handler
   
   // initialization
   function start() {
@@ -126,20 +125,32 @@
       $this->get_id(); // otherwise get_id() is called in custom open() method
   }
   
+  // the following functions used in session_set_save_handler
+  
+  /* 
+     open callback
+     @access private
+  */
+  
   function open() {
     $this->get_id();
     return true;
   }
 
+  /* 
+     close callback
+     @access private
+  */
   function close() {
     return true;
   }
   
   
-  /**
-   * delete the current session destroying all registered data
+  /*
+     delete callback.
+     @access private
    */
-  function delete () {
+  function del () {
     
     if ($this->module == 'user') {
       $this->that->ac_delete($this->id, $this->name);
@@ -150,11 +161,10 @@
     return true;
   }
   
-   /* freeze():
-    
-      freezes all registered things ( scalar variables, arrays, objects ) into
-      a database table    
-    */
+  /*
+     write callback.
+     @access private
+  */
   function freeze () {
     if ($this->module == 'user') {
       $str = session_encode();
@@ -165,9 +175,10 @@
     return true;
   }
 
-  /* thaw():
-     get frozen session vars
-     */
+  /*
+     read callback.
+     @access private
+  */
   function thaw() {
   
       if ($this->module == 'user') {
@@ -178,9 +189,11 @@
       return true;
   }
     
-  /* Garbage collection
+  /*
+     gc callback.
      Destroy all session data older than $this->gc_time
-   */
+     @access private
+  */
   function gc() {
     if ($this->module == 'user') {
     
@@ -212,7 +225,7 @@
             array (&$this, 'close'),
             array (&$this, 'thaw'),
             array (&$this, 'freeze'),
-            array (&$this, 'delete'),
+            array (&$this, 'del'),
             array (&$this, 'gc')
         );
         break;



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to