Auto start session from main file (before Controller is loaded) if session is enabled in the config.

This commit is contained in:
Josh Sherman 2010-12-05 17:07:55 -05:00
parent 12d1143bd0
commit 4c366d72a8
2 changed files with 10 additions and 1 deletions

View file

@ -155,7 +155,10 @@ class Controller extends Object
{
if ($module->session)
{
session_start();
if (session_id() == '')
{
session_start();
}
}
else
{

View file

@ -105,6 +105,12 @@ if (isset($config->php['exception_handler']))
set_exception_handler($config->php['exception_handler']);
}
// Starts session handling
if (isset($config->pickles['session']) && $config->pickles['session'] == true && session_id() == '')
{
session_start();
}
// }}}
// {{{ Auto[magical] Loader