fix SQL error from clearing cache during install

Invalid SQL: DELETE FROM egw_notificationpopup WHERE notify_type='push' AND notify_created <
This commit is contained in:
Ralf Becker 2016-06-05 16:41:02 +02:00
parent 849b94374b
commit 1cf91d150c

View File

@ -110,10 +110,13 @@ class notifications_push implements Json\PushBackend
*/
protected static function cleanup_push_msgs()
{
self::$db->delete(self::TABLE, array(
'notify_type' => self::TYPE,
'notify_created < '.self::$db->from_unixtime(Api\Session::heartbeat_limit()),
), __LINE__, __FILE__, self::APP);
if (($ts = self::$db->from_unixtime(Api\Session::heartbeat_limit())))
{
self::$db->delete(self::TABLE, array(
'notify_type' => self::TYPE,
'notify_created < '.$ts,
), __LINE__, __FILE__, self::APP);
}
}
/**