From 65164295778caa2c4e623e7c8e195f2aa3560121 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Thu, 07 Apr 2016 13:19:58 -0400
Subject: [PATCH] - Changed 0000-00-00 date and datetime values to NULL (mySQL compatibility), Fixes: #3690

---
 interface/lib/app.inc.php |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/interface/lib/app.inc.php b/interface/lib/app.inc.php
index e23b6ca..f9ef167 100755
--- a/interface/lib/app.inc.php
+++ b/interface/lib/app.inc.php
@@ -71,6 +71,13 @@
 			$this->uses('session');
 			$sess_timeout = $this->conf('interface', 'session_timeout');
 			$cookie_domain = (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST']);
+			
+			// Workaround for Nginx servers
+			if($cookie_domain == '_') {
+				$tmp = explode(':',$_SERVER["HTTP_HOST"]);
+				$cookie_domain = $tmp[0];
+				unset($tmp);
+			}
 			$cookie_secure = ($_SERVER["HTTPS"] == 'on')?true:false;
 			if($sess_timeout) {
 				/* check if user wants to stay logged in */

--
Gitblit v1.9.1