X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=dav%2Ffriendica%2Fmain.php;fp=dav%2Ffriendica%2Fmain.php;h=1025a7866704174e1952c3baa763c26578575618;hb=db91eb4ae6ab0a3c9fb0627f0bb405aac70a0440;hp=0fe939ebbd47d38b4eaa72d76865bab36fae0911;hpb=15b0328f53db55fae39cf3616a6352dfb24d203b;p=friendica-addons.git diff --git a/dav/friendica/main.php b/dav/friendica/main.php index 0fe939eb..1025a786 100644 --- a/dav/friendica/main.php +++ b/dav/friendica/main.php @@ -253,6 +253,7 @@ function dav_cron(&$a, &$b) dav_include_files(); $r = q("SELECT * FROM %s%snotifications WHERE `notified` = 0 AND `alert_date` <= NOW()", CALDAV_SQL_DB, CALDAV_SQL_PREFIX); + if (is_array($r)) { foreach ($r as $not) { q("UPDATE %s%snotifications SET `notified` = 1 WHERE `id` = %d", CALDAV_SQL_DB, CALDAV_SQL_PREFIX, $not["id"]); $event = q("SELECT * FROM %s%sjqcalendar WHERE `calendarobject_id` = %d", CALDAV_SQL_DB, CALDAV_SQL_PREFIX, $not["calendarobject_id"]); @@ -290,6 +291,7 @@ function dav_cron(&$a, &$b) break; } } + } }