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

@ -109,12 +109,15 @@ class notifications_push implements Json\PushBackend
* Delete push messges older then our heartbeat-limit (poll frequency of notifications) * Delete push messges older then our heartbeat-limit (poll frequency of notifications)
*/ */
protected static function cleanup_push_msgs() protected static function cleanup_push_msgs()
{
if (($ts = self::$db->from_unixtime(Api\Session::heartbeat_limit())))
{ {
self::$db->delete(self::TABLE, array( self::$db->delete(self::TABLE, array(
'notify_type' => self::TYPE, 'notify_type' => self::TYPE,
'notify_created < '.self::$db->from_unixtime(Api\Session::heartbeat_limit()), 'notify_created < '.$ts,
), __LINE__, __FILE__, self::APP); ), __LINE__, __FILE__, self::APP);
} }
}
/** /**
* Init our static variables eg. database object * Init our static variables eg. database object