diff options
author | Mario <mario@mariovavti.com> | 2019-11-13 13:51:00 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-11-13 13:51:00 +0000 |
commit | a982aecd5b2f8f36507f6893028232d7f7a4c008 (patch) | |
tree | 05480222d116f4e24fc9a832d14cad8835474dfc | |
parent | 52bd27a0280c736e563ccc67a9307cd75bd14d3f (diff) | |
download | volse-hubzilla-a982aecd5b2f8f36507f6893028232d7f7a4c008.tar.gz volse-hubzilla-a982aecd5b2f8f36507f6893028232d7f7a4c008.tar.bz2 volse-hubzilla-a982aecd5b2f8f36507f6893028232d7f7a4c008.zip |
sse: revert to reset to array
-rw-r--r-- | Zotlabs/Module/Sse.php | 2 | ||||
-rwxr-xr-x | boot.php | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/Zotlabs/Module/Sse.php b/Zotlabs/Module/Sse.php index e1778718c..3e46a325c 100644 --- a/Zotlabs/Module/Sse.php +++ b/Zotlabs/Module/Sse.php @@ -83,7 +83,7 @@ class Sse extends Controller { echo 'data: ' . json_encode($result); echo "\n\n"; - set_xconfig(self::$ob_hash, 'sse', 'notifications', ''); + set_xconfig(self::$ob_hash, 'sse', 'notifications', []); set_xconfig(self::$ob_hash, 'sse', 'timestamp', datetime_convert()); unset($result); } @@ -1839,7 +1839,7 @@ function notice($s) { $t = get_xconfig($hash, 'sse', 'timestamp'); if(datetime_convert('UTC', 'UTC', $t) < datetime_convert('UTC', 'UTC', '- 30 seconds')) { - del_xconfig($hash, 'sse', 'notifications'); + set_xconfig($hash, 'sse', 'notifications', []); } $x = get_xconfig($hash, 'sse', 'notifications'); @@ -1852,7 +1852,6 @@ function notice($s) { if (App::$interactive) { $x['notice']['notifications'][] = $s; - set_xconfig($hash, 'sse', 'timestamp', datetime_convert()); set_xconfig($hash, 'sse', 'notifications', $x); } @@ -1892,7 +1891,7 @@ function info($s) { $t = get_xconfig($hash, 'sse', 'timestamp'); if(datetime_convert('UTC', 'UTC', $t) < datetime_convert('UTC', 'UTC', '- 30 seconds')) { - del_xconfig($hash, 'sse', 'notifications'); + set_xconfig($hash, 'sse', 'notifications', []); } $x = get_xconfig($hash, 'sse', 'notifications'); @@ -1905,7 +1904,6 @@ function info($s) { if(App::$interactive) { $x['info']['notifications'][] = $s; - set_xconfig($hash, 'sse', 'timestamp', datetime_convert()); set_xconfig($hash, 'sse', 'notifications', $x); } |