Cleaned up some stuff.
This commit is contained in:
parent
9a72861f58
commit
147a02b029
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user