php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #52982
Patch php-trunk-session-status-bools revision 2011-07-26 18:53 UTC by arpad@php.net
Patch php-trunk-session-status revision 2011-07-26 18:52 UTC by arpad@php.net
Patch session.c.patch.txt revision 2010-10-04 07:05 UTC by php dot net at kenman dot net
revision 2010-10-04 02:46 UTC by php dot net at kenman dot net

Patch session.c.patch.txt for Session related Bug #52982

Patch version 2010-10-04 02:46 UTC

Return to Bug #52982 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions:

Developer: php.net@kenman.net

Index: C:/phpdev/svn/session.c
===================================================================
--- C:/phpdev/svn/session.c	(revision 1)
+++ C:/phpdev/svn/session.c	(revision 3)
@@ -1733,6 +1733,17 @@
 }
 /* }}} */
 
+/* {{{ proto bool session_is_active(bool)
+   Determine if a sesion is currently active. */
+static PHP_FUNCTION(session_is_active)
+{
+	if (PS(session_status) != php_session_active) {
+		RETURN_FALSE;
+	}
+	RETURN_TRUE;
+}
+/* }}} */
+
 /* {{{ proto bool session_regenerate_id([bool delete_old_session])
    Update the current session id with a newly generated one. If delete_old_session is set to true, remove the old session. */
 static PHP_FUNCTION(session_regenerate_id)
@@ -2119,6 +2130,7 @@
 	PHP_FE(session_set_cookie_params, arginfo_session_set_cookie_params)
 	PHP_FE(session_get_cookie_params, arginfo_session_void)
 	PHP_FE(session_write_close,       arginfo_session_void)
+	PHP_FE(session_is_active,         arginfo_session_void)
 	PHP_FALIAS(session_commit, session_write_close, arginfo_session_void)
 	{NULL, NULL, NULL}
 };
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sat Apr 19 04:01:55 2014 UTC