diff options
Diffstat (limited to 'boot.php')
-rwxr-xr-x | boot.php | 29 |
1 files changed, 22 insertions, 7 deletions
@@ -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', []); |