ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-Lib-Dev
php-Lib-Dev
[phplib-dev] cvs commit
by uw other posts by this author
May 30 2001 7:00PM messages near this date
[phplib-dev] cvs commit | Re: [phplib-dev] cvs commit
From: uw
Date: Wed May 30 12:48:56 2001
Modified files:
      php-lib/php/session/session4.inc
      php-lib/php/session/session4_custom.inc

Log message:
Don't know anymore on all the changes - any further comments on the API?



Index: php-lib/php/session/session4.inc
diff -u php-lib/php/session/session4.inc:1.7 php-lib/php/session/session4.inc:1.8
--- php-lib/php/session/session4.inc:1.7	Wed May 30 10:37:13 2001
+++ php-lib/php/session/session4.inc	Wed May 30 12:48:24 2001
@@ -7,27 +7,28 @@
 * @copyright 1998,1999 NetUSE AG, Boris Erdmann, Kristian Koehntopp
 *            2000 Teodor Cimpoesu <teo@[...].net> 
 * @author    Teodor Cimpoesu <teo@[...].net> , Ulf Wendel <uw@[...].de>
-* @version   $Id: session4.inc,v 1.7 2001/05/30 08:37:13 max Exp $
+* @version   $Id: session4.inc,v 1.8 2001/05/30 10:48:24 uw Exp $
 * @access    public
 * @package   PHPLib
 */ 
 class Session4 {
 
+ 
   /**
-  * Name of an optional autoinit-file 
-  * 
-  * @var    string
-  */
+  * Name of the autoinit-File, if any.
+  *
+  * @var  string
+  */ 
   var $auto_init = "";
   
   
   /**
-  * Set to false only, if all pages call
+  * Set to 0 only, if all pages call page_close() guaranteed.
+  *
+  * @var  integer
+  */
+  var $secure_auto_init = 1;
   
-  * @var  boolean
-  */  
-  var $secure_auto_init = true;
-
   
   /**
   * Marker: Did we already include the autoinit file? 
@@ -148,7 +149,7 @@
   
   /**
   * @brother id()
-  * @deprec  $Id: session4.inc,v 1.7 2001/05/30 08:37:13 max Exp $
+  * @deprec  $Id: session4.inc,v 1.8 2001/05/30 10:48:24 uw Exp $
   * @access public  
   */  
   function get_id($sid = '') {
@@ -208,7 +209,7 @@
   *		 doesn't seem to do (looking @ the session.c:940)
   * uw: yes we should keep it to remain the same interface, but deprec. 
   *
-  * @deprec $Id: session4.inc,v 1.7 2001/05/30 08:37:13 max Exp $
+  * @deprec $Id: session4.inc,v 1.8 2001/05/30 10:48:24 uw Exp $
   * @access public  
   * @global $HTTP_COOKIE_VARS
   */
@@ -232,7 +233,7 @@
   * @return boolean session_destroy return value
   * @access public  
   */
-  function delete () {
+  function delete() {
    
     $this-> put_id();
     
@@ -250,10 +251,10 @@
   * @return string  rewritten url with session id included
   * @see    $trans_id_enabled
   * @global $HTTP_COOKIE_VARS
-  * @deprec $Id: session4.inc,v 1.7 2001/05/30 08:37:13 max Exp $
+  * @deprec $Id: session4.inc,v 1.8 2001/05/30 10:48:24 uw Exp $
   * @access public  
   */
-  function url ($url) {
+  function url($url) {
      global $HTTP_COOKIE_VARS;
     
     if ($this-> trans_id_enabled) 
@@ -269,24 +270,14 @@
 
     return $url;
     /*
-    Ulf:
-    Maxim, can you merge it? You're code looks more 
-    sophisticated. I'll also vote for you on the first
-    international PHP obfuscated code contest if you can 
-    add some bit operations and format the code like a "M" for 
-    Maxim.
-    Maxim:
-    how about this? :)
-
-	$url                            .=(
-	strpos                       ( $url,
-	'?' )  )                   ?  chr (
-	ord (  '&')              & ord ( '?'
-	)  )  :  chr          ( ord ( '&'  )
-	|  ord      (   '?'))   .urlencode (
-	$this-> name).    "="    .$this->id ;
-    
-    
+
+    $url                            .=(
+    strpos                       ( $url,
+    '?' )  )                   ?  chr (
+    ord (  '&')              & ord ( '?'
+    )  )  :  chr          ( ord ( '&'  )
+    |  ord      (   '?'))   .urlencode (
+    $this-> name).    "="    .$this->id ;
     */
   } // end func url
 
@@ -315,7 +306,7 @@
     return $this-> url(getenv('REQUEST_URI'));
   } // end func self_url
 
-  
+
   /**
   * Print the current URL
   * @return void
@@ -323,8 +314,8 @@
   function pself_url() {
     print $this-> self_url();
   } // end func pself_url
- 
-  
+
+
   /**
   * Stores session id in a hidden variable (part of a form).
   *
@@ -332,44 +323,43 @@
   * @access public  
   */
   function get_hidden_session() {
-    return sprintf('<input type="hidden" name="%s" value="%s"> ', 
+  
+    if ($this-> trans_id_enabled) 
+      return "";
+    else 
+      return sprintf('<input type="hidden" name="%s" value="%s"> ', 
                     $this-> name, 
                     $this-> id
       );
+      
   } // end fun get_hidden_session
 
-  
+
   /**
   * @brother  get_hidden_session
   * @return   void
   */
   function hidden_session() {
-    if ($this-> trans_id_enabled) 
-      return;
-    
     print $this-> get_hidden_session();
   } // end func hidden_session
- 
- 
+
+
   /**
   * @brother get_hidden_session
   */
   function get_hidden_id() {
     return $this-> get_hidden_session();
   } // end func get_hidden_id
-  
-  
+
+
   /**
   * @brother hidden_session
   */
   function hidden_id() {
-    if ($this-> trans_id_enabled) 
-      return;
-    
     print $this-> get_hidden_session();
   } // end func hidden_id
 
-  
+ 
   /**
   * Prepend variables passed into an array to a query string.
   * 
Index: php-lib/php/session/session4_custom.inc
diff -u php-lib/php/session/session4_custom.inc:1.10 php-lib/php/session/session4_custom.inc
:1.11
--- php-lib/php/session/session4_custom.inc:1.10	Wed May 30 11:08:53 2001
+++ php-lib/php/session/session4_custom.inc	Wed May 30 12:48:25 2001
@@ -10,7 +10,7 @@
  * some of the code taken from Teodor Cimpoesu's session4 class
  * Copyright (c) 2000 Teodor Cimpoesu <teo@[...].net> 
  *
- * $Id: session4_custom.inc,v 1.10 2001/05/30 09:08:53 max Exp $
+ * $Id: session4_custom.inc,v 1.11 2001/05/30 10:48:25 uw Exp $
  *
  */ 
 
@@ -155,7 +155,6 @@
     if ($this-> module == 'user') {
       $this-> that->ac_delete($this->id, $this->name);
       $this-> put_id();
-      return true;
     }
     
     return true;



---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-dev-unsubscribe@[...].de
For additional commands, e-mail: phplib-dev-help@lists.netuse.de
Thread:
uw
Maxim Derkachev

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved