sas Tue Feb 18 13:50:44 2003 EDT
Modified files:
/php4/ext/session php_session.h session.c
Log:
add session_regenerate_id()
Index: php4/ext/session/php_session.h
diff -u php4/ext/session/php_session.h:1.88 php4/ext/session/php_session.h:1.89
--- php4/ext/session/php_session.h:1.88 Mon Feb 10 19:42:14 2003
+++ php4/ext/session/php_session.h Tue Feb 18 13:50:43 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.351 php4/ext/session/session.c:1.352
--- php4/ext/session/session.c:1.351 Mon Feb 10 19:42:14 2003
+++ php4/ext/session/session.c Tue Feb 18 13:50:44 2003
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: session.c,v 1.351 2003/02/11 00:42:14 sas Exp $ */
+/* $Id: session.c,v 1.352 2003/02/18 18:50:44 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