]> git.datanom.net - qtadmin.git/blobdiff - lib/utils.inc.php
Add check for valid session
[qtadmin.git] / lib / utils.inc.php
index d61b9e7dd137f286b24f06244df3b9ea09a3c681..fadc39717c3626343508d9929cd1461388c1f6b8 100644 (file)
@@ -63,15 +63,17 @@ class Utils {
         global $CFG;
 
         if (isset($CFG->session_timeout)) {
-            $this->timeout = $CFG->session_timeout * 60;
+            $this->settings['timeout'] = $CFG->session_timeout * 60;
         } else {
-            $this->timeout = 20 * 60;
+            $this->settings['timeout'] = 20 * 60;
         }
 
-        if (ini_get('session.gc_maxlifetime') != $this->timeout)
-            ini_set('session.gc_maxlifetime', $this->timeout);
-        if (ini_get('session.cookie_lifetime') != $this->timeout)
-            ini_set('session.cookie_lifetime', $this->timeout);
+        if (ini_get('session.gc_maxlifetime') != $this->settings['timeout'])
+            ini_set('session.gc_maxlifetime', $this->settings['timeout']);
+        if (ini_get('session.cookie_lifetime') != $this->settings['timeout'])
+            ini_set('session.cookie_lifetime', $this->settings['timeout']);
+
+        $_SESSION['settings'] = $this->settings;
 
         session_start();
     }
This page took 0.032994 seconds and 5 git commands to generate.