From 7095bf0864c8fa03d6c902a5fced3cab0f442667 Mon Sep 17 00:00:00 2001
From: kaetemi
Date: Sat, 6 Sep 2014 20:56:06 +0200
Subject: [PATCH] This should fix #193
---
code/web/public_php/admin/functions_auth.php | 62 ++++++++++++--------
code/web/public_php/setup/header.php | 2 +-
code/web/public_php/setup/index.php | 4 +-
3 files changed, 39 insertions(+), 29 deletions(-)
diff --git a/code/web/public_php/admin/functions_auth.php b/code/web/public_php/admin/functions_auth.php
index b56a12064..e65b90e83 100644
--- a/code/web/public_php/admin/functions_auth.php
+++ b/code/web/public_php/admin/functions_auth.php
@@ -1,8 +1,8 @@
display('index_login.tpl');
}
- function nt_auth_start_session()
+ function nt_auth_start_session()
{
+ global $NEL_SETUP_SESSION;
+ if (isset($NEL_SETUP_SESSION) && ($NEL_SETUP_SESSION)) {
+ return;
+ }
+
session_name(NELTOOL_SESSIONID);
session_cache_limiter('nocache');
session_start();
- header("Expires: Mon, 01 May 2000 06:00:00 GMT");
- header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
- header("Cache-Control: no-store, no-cache, must-revalidate");
- header("Cache-Control: post-check=0, pre-check=0", false);
- header("Pragma: no-cache");
+ header("Expires: Mon, 01 May 2000 06:00:00 GMT");
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+ header("Cache-Control: no-store, no-cache, must-revalidate");
+ header("Cache-Control: post-check=0, pre-check=0", false);
+ header("Pragma: no-cache");
}
- function nt_auth_stop_session()
+ function nt_auth_stop_session()
+ {
+ global $NEL_SETUP_SESSION;
+ if (isset($NEL_SETUP_SESSION) && ($NEL_SETUP_SESSION)) {
+ return;
+ }
+
+ global $NELTOOL;
+
+ foreach($NELTOOL['SESSION_VARS'] as $key => $val)
+ {
+ unset($NELTOOL['SESSION_VARS'][$key]);
+ }
+ }
+
+ function nt_auth_set_session_var($name,$value)
{
global $NELTOOL;
- foreach($NELTOOL['SESSION_VARS'] as $key => $val)
- {
- unset($NELTOOL['SESSION_VARS'][$key]);
- }
- }
-
- function nt_auth_set_session_var($name,$value)
- {
- global $NELTOOL;
-
- $NELTOOL['SESSION_VARS'][$name] = $value;
+ $NELTOOL['SESSION_VARS'][$name] = $value;
}
function nt_auth_get_session_var($name)
{
- global $NELTOOL;
+ global $NELTOOL;
- if (isset($NELTOOL['SESSION_VARS'][$name])) return $NELTOOL['SESSION_VARS'][$name];
- return null;
+ if (isset($NELTOOL['SESSION_VARS'][$name])) return $NELTOOL['SESSION_VARS'][$name];
+ return null;
}
- function nt_auth_unset_session_var($name)
+ function nt_auth_unset_session_var($name)
{
- global $NELTOOL;
+ global $NELTOOL;
- unset($NELTOOL['SESSION_VARS'][$name]);
+ unset($NELTOOL['SESSION_VARS'][$name]);
}
?>
diff --git a/code/web/public_php/setup/header.php b/code/web/public_php/setup/header.php
index 317637ef8..a93fd85c1 100644
--- a/code/web/public_php/setup/header.php
+++ b/code/web/public_php/setup/header.php
@@ -1,7 +1,7 @@
Add Domain
-->
-
+