aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php29
1 files changed, 22 insertions, 7 deletions
diff --git a/boot.php b/boot.php
index b0b838231..b4e472d47 100755
--- a/boot.php
+++ b/boot.php
@@ -1831,12 +1831,19 @@ function notice($s) {
*/
$hash = get_observer_hash();
+ $sse_id = false;
- if (! $hash)
- return;
-
+ if(! $hash) {
+ if(session_id()) {
+ $sse_id = true;
+ $hash = 'sse_id.' . session_id();
+ }
+ else {
+ return;
+ }
+ }
- $t = get_xconfig($hash, 'sse', 'timestamp');
+ $t = get_xconfig($hash, 'sse', 'timestamp', NULL_DATE);
if(datetime_convert('UTC', 'UTC', $t) < datetime_convert('UTC', 'UTC', '- 30 seconds')) {
set_xconfig($hash, 'sse', 'notifications', []);
@@ -1884,11 +1891,19 @@ function info($s) {
*/
$hash = get_observer_hash();
+ $sse_id = false;
- if (! $hash)
- return;
+ if(! $hash) {
+ if(session_id()) {
+ $sse_id = true;
+ $hash = 'sse_id.' . session_id();
+ }
+ else {
+ return;
+ }
+ }
- $t = get_xconfig($hash, 'sse', 'timestamp');
+ $t = get_xconfig($hash, 'sse', 'timestamp', NULL_DATE);
if(datetime_convert('UTC', 'UTC', $t) < datetime_convert('UTC', 'UTC', '- 30 seconds')) {
set_xconfig($hash, 'sse', 'notifications', []);