]> git.datanom.net - qtadmin.git/blobdiff - lib/utils.inc.php
Add check for valid session
[qtadmin.git] / lib / utils.inc.php
index d61b9e7dd137f286b24f06244df3b9ea09a3c681..640d828edfffedf540804b91d052ace2d6284489 100644 (file)
@@ -4,6 +4,7 @@ require_once $CFG->root .'config.php';
 
 class Utils {
 
+    private $timeout = false;
     private $settings;
     private $header = '<!DOCTYPE html>
 <html>
@@ -48,12 +49,18 @@ class Utils {
             $this->startSession();
         }
 
+        if (false !== $this->timeout) {
+            $timeout = $this->timeout;
+        } else {
+            $timeout = 0;
+        }
+
         $this->settings = array(
             'server' => $_SERVER,
             'user' => null,
             'admin' => false,
             'loginStatus' => 'Not logged in',
-            'timeout' => 0
+            'timeout' => $timeout
         );
 
         $_SESSION['settings'] = $this->settings;
This page took 0.053544 seconds and 5 git commands to generate.