mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
if session is already closed, reopen it for push-notification, as we need to store if a push message is already delivered
This commit is contained in:
parent
6664aea901
commit
f9a961085f
@ -39,6 +39,10 @@ class notifications_push implements Json\PushBackend
|
||||
|
||||
public static function get()
|
||||
{
|
||||
if (session_status() === PHP_SESSION_NONE)
|
||||
{
|
||||
$session_reopened = session_start();
|
||||
}
|
||||
$already_send =& Api\Cache::getSession(__CLASS__, 'already_send');
|
||||
$max_id = Api\Cache::getInstance(__CLASS__, 'max_id');
|
||||
|
||||
@ -72,6 +76,10 @@ class notifications_push implements Json\PushBackend
|
||||
$already_send = $row['notify_id'];
|
||||
}
|
||||
}
|
||||
if (!empty($session_reopened))
|
||||
{
|
||||
session_write_close();
|
||||
}
|
||||
//error_log(__METHOD__."() max_id=$max_id, already_sent=$already_send");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user