File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -65,10 +65,13 @@ public function __construct() {
6565 //* Start the session
6666 if ($ this ->_conf ['start_session ' ] == true ) {
6767
68- $ this ->uses ('session,ini_parser ' );
69- $ tmp = $ this ->db ->queryOneRecord ("SELECT value FROM sys_config WHERE config_id = 2 AND group = 'interface' AND name = 'session_timeout' " );
68+ $ this ->uses ('session ' );
69+ $ tmp = $ this ->db ->queryOneRecord ("SELECT ` value` FROM sys_config WHERE ` config_id` = 2 AND ` group` = 'interface' AND ` name` = 'session_timeout' " );
7070 if ($ tmp && $ tmp ['value ' ] > 0 ) {
7171 $ this ->session ->set_timeout ($ tmp ['value ' ]);
72+ session_set_cookie_params (($ tmp ['value ' ] * 60 ) + 300 ); // make the cookie live 5 minutes longer
73+ } else {
74+ session_set_cookie_params (0 ); // until browser is closed
7275 }
7376
7477 session_set_save_handler ( array ($ this ->session , 'open ' ),
@@ -79,7 +82,7 @@ public function __construct() {
7982 array ($ this ->session , 'gc ' ));
8083
8184 session_start ();
82-
85+
8386 //* Initialize session variables
8487 if (!isset ($ _SESSION ['s ' ]['id ' ]) ) $ _SESSION ['s ' ]['id ' ] = session_id ();
8588 if (empty ($ _SESSION ['s ' ]['theme ' ])) $ _SESSION ['s ' ]['theme ' ] = $ conf ['theme ' ];
You can’t perform that action at this time.
0 commit comments