sas Tue Feb 18 13:51:34 2003 EDT
Modified files: (Branch: PHP_4)
/php4/ext/session php_session.h session.c
Log:
MFH session_regenerate_id
Index: php4/ext/session/php_session.h
diff -u php4/ext/session/php_session.h:1.84.2.1.2.2
php4/ext/session/php_session.h:1.84.2.1.2.3
--- php4/ext/session/php_session.h:1.84.2.1.2.2 Mon Feb 10 19:53:32 2003
+++ php4/ext/session/php_session.h Tue Feb 18 13:51:34 2003
@@ -132,6 +132,7 @@
PHP_FUNCTION(session_module_name);
PHP_FUNCTION(session_save_path);
PHP_FUNCTION(session_id);
+PHP_FUNCTION(session_regenerate_id);
PHP_FUNCTION(session_decode);
PHP_FUNCTION(session_register);
PHP_FUNCTION(session_unregister);
Index: php4/ext/session/session.c
diff -u php4/ext/session/session.c:1.336.2.5.2.2
php4/ext/session/session.c:1.336.2.5.2.3
--- php4/ext/session/session.c:1.336.2.5.2.2 Mon Feb 10 19:53:32 2003
+++ php4/ext/session/session.c Tue Feb 18 13:51:34 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: session.c,v 1.336.2.5.2.2 2003/02/11 00:53:32 sas Exp $ */
+/* $Id: session.c,v 1.336.2.5.2.3 2003/02/18 18:51:34 sas Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -61,6 +61,7 @@
PHP_FE(session_module_name, NULL)
PHP_FE(session_save_path, NULL)
PHP_FE(session_id, NULL)
+ PHP_FE(session_regenerate_id, NULL)
PHP_FE(session_decode, NULL)
PHP_FE(session_register, NULL)
PHP_FE(session_unregister, NULL)
@@ -1355,6 +1356,20 @@
}
RETVAL_STRING(old, 0);
+}
+/* }}} */
+
+/* {{{ proto string session_regenerate_id()
+ Update the current session id with a newly generated one. */
+PHP_FUNCTION(session_regenerate_id)
+{
+ if (PS(mod)) {
+ if (PS(id)) efree(PS(id));
+
+ PS(id) = PS(mod)->s_create_sid(&PS(mod_data), NULL TSRMLS_CC);
+ RETURN_TRUE;
+ }
+ RETURN_FALSE;
}
/* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php