Created
April 19, 2010 16:03
-
-
Save darron/371214 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function __construct() { | |
- @session_start(); | |
+ if ((defined('IN_NTERCHANGE') && IN_NTERCHANGE) || (defined('GLOBAL_SESSION_COOKIE') && GLOBAL_SESSION_COOKIE == true)) { | |
+ @session_start(); | |
+ } elseif (defined('GLOBAL_SESSION_COOKIE') && GLOBAL_SESSION_COOKIE == false) { | |
+ // Do nothing. | |
+ } else { | |
+ // Default behaviour | |
+ @session_start(); | |
+ } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So - this attempts to solve the problem of too many useless session cookies.
If you're in nterchange OR you've set GLOBAL_SESSION_COOKIE to true - it starts a session.
If it's set to FALSE - then it doesn't set a session.
Otherwise, it does the default behaviour, which is to start one.
Comments?