Prijemca neznamy. Recipient Unknown.
Povodna sprava: (Original Message:) >From [EMAIL PROTECTED] Thu Jan 11 15:01:09 2001 Received: from mail.netuse.de (ns1.netuse.de [193.98.110.1]) by smtp2.post.sk (8.11.1/8.11.1/Debian 8.11.0-6) with ESMTP id f0BE18g25746 for <[EMAIL PROTECTED]>; Thu, 11 Jan 2001 15:01:09 +0100 X-Authentication-Warning: smtp2.post.sk: Host ns1.netuse.de [193.98.110.1] claimed to be mail.netuse.de Received: from lists.netuse.de (split.netuse.de [193.98.110.56]) by mail.netuse.de (8.9.3+Sun/8.9.3) with SMTP id PAA06495 for <[EMAIL PROTECTED]>; Thu, 11 Jan 2001 15:01:02 +0100 (MET) Received: (qmail 5344 invoked by alias); 11 Jan 2001 13:56:34 -0000 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm Precedence: bulk List-Post: <mailto:[EMAIL PROTECTED]> List-Help: <mailto:[EMAIL PROTECTED]> List-Unsubscribe: <mailto:[EMAIL PROTECTED]> List-Subscribe: <mailto:[EMAIL PROTECTED]> Delivered-To: mailing list [EMAIL PROTECTED] Received: (qmail 5335 invoked from network); 11 Jan 2001 13:56:33 -0000 Date: Thu, 11 Jan 2001 16:58:35 +0300 From: max <[EMAIL PROTECTED]> X-Mailer: The Bat! (v1.45) Personal Reply-To: [EMAIL PROTECTED] Organization: Symbol Plus Publishing Ltd. X-Priority: 3 (Normal) Message-ID: <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] X-Sender: "Max A. Derkachev" <[EMAIL PROTECTED]> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: [phplib] session4_custom.inc update To those who might be interested: CVS log: Moving to PHP4.0.4 session_set_save_handler(), that may take arrays (obj, 'method_name') as arguments instead of simple strings. That made possible to remove all wrappers of sess->methods. Don't use this version if you use PHP version < 4.0.4. Use version 1.3 of the class for PHP versions prior to 4.0.4 instead. Index: php-lib/php/session/session4_custom.inc diff -u php-lib/php/session/session4_custom.inc:1.3 php-lib/php/session/session4_custom.inc:1.4 --- php-lib/php/session/session4_custom.inc:1.3 Thu Jan 11 09:08:42 2001 +++ php-lib/php/session/session4_custom.inc Thu Jan 11 14:46:35 2001 @@ -6,11 +6,10 @@ * Boris Erdmann, Kristian Koehntopp * * Copyright (c) 2000 Maxim Derkachev <[EMAIL PROTECTED]> - * * some of the code taken from Teodor Cimpoesu's session4 class * Copyright (c) 2000 Teodor Cimpoesu <[EMAIL PROTECTED]> * - * $Id: session4_custom.inc,v 1.3 2001/01/11 08:08:42 max Exp $ + * $Id: session4_custom.inc,v 1.4 2001/01/11 13:46:35 max Exp $ * */ @@ -73,7 +72,6 @@ $newid = false; $id = session_id(); - if (!$id) { $newid = true; $id = $this->that->ac_newid(md5(uniqid($this->magic)), $this->name); @@ -90,7 +88,6 @@ setcookie ($rhis->name, $this->id, time()+$this->lifetime*60, "/", $this->cookie_domain); } } - } /** @@ -124,7 +121,7 @@ if (!$HTTP_COOKIE_VARS[$this->name]) { $url .= ( strpos($url, "?") != false ? "&" : "?" ) - . urlencode($this->name)."="."$this->id"; + . urlencode($this->name)."=".$this->id; } return $url; @@ -197,7 +194,6 @@ return session_decode ($data_string); } - /* OB: no clue on these functions utility */ function reimport_get_vars() { $this->reimport_any_vars("HTTP_GET_VARS"); } @@ -294,17 +290,17 @@ $this->that->ac_start(); // set custom session handlers - session_set_save_handler('mysess_open', - 'mysess_close', - 'mysess_read', - 'mysess_write', - 'mysess_destroy', - 'mysess_gc' + session_set_save_handler(array (&$this, 'open'), + array (&$this, 'close'), + array (&$this, 'thaw'), + array (&$this, 'freeze'), + array (&$this, 'delete'), + array (&$this, 'gc') ); } function set_tokenname(){ - $this->name = $this->cookiename==""?$this->classname:$this->cookiename; + $this->name = ($this->cookiename=="") ? $this->classname : $this->cookiename; session_name ($this->name); } @@ -327,43 +323,5 @@ break; } } - - - -} - -/* wrappers for session_set_save_handler(). - Could not manage to make session_set_save_handler() - take $sess->methods as arguments. - */ - -function mysess_open() { - global $sess; - return $sess->open(); -} - -function mysess_close() { - global $sess; - return $sess->close(); -} - -function mysess_read() { - global $sess; - return $sess->thaw(); -} - -function mysess_write() { - global $sess; - return $sess->freeze(); -} - -function mysess_destroy() { - global $sess; - return $sess->delete(); -} - -function mysess_gc() { - global $sess; - return $sess->gc(); } ?> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]