Cleaned up some stuff.

This commit is contained in:
Maxim Stewart 2018-07-29 00:02:36 -05:00
parent 9a72861f58
commit 147a02b029
1 changed files with 3 additions and 6 deletions

View File

@ -3,11 +3,8 @@
session_start(); session_start();
include 'config.php'; include 'config.php';
if (isset($_SESSION["refreshState"])) { if (!isset($_SESSION["refreshState"])) {
$state = $_SESSION["refreshState"]; $_SESSION["refreshState"] = "none";
} else {
$state = "none";
$_SESSION["refreshState"] = $state;
} }
if (isset($_SESSION["unlockTime"]) && $_SESSION["unlockTime"] >= 0) { if (isset($_SESSION["unlockTime"]) && $_SESSION["unlockTime"] >= 0) {
@ -16,7 +13,7 @@
header('Content-Type: text/event-stream'); header('Content-Type: text/event-stream');
header('Cache-Control: no-cache'); header('Cache-Control: no-cache');
echo "data:" . $state . "\n\n"; echo "data:" . $_SESSION["refreshState"] . "\n\n";
$_SESSION["refreshState"] = "none"; $_SESSION["refreshState"] = "none";
flush(); flush();