diff options
Diffstat (limited to 'Zotlabs/Daemon')
-rw-r--r-- | Zotlabs/Daemon/Cron.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php index 186f3efcf..4a5d88f8f 100644 --- a/Zotlabs/Daemon/Cron.php +++ b/Zotlabs/Daemon/Cron.php @@ -69,19 +69,18 @@ class Cron { // expire any expired items - $r = q("select id,item_wall from item where expires > '2001-01-01 00:00:00' and expires < %s + $r = q("select id, uid, item_wall from item where expires > '2001-01-01 00:00:00' and expires < %s and item_deleted = 0 ", db_utcnow() ); + if ($r) { - require_once('include/items.php'); foreach ($r as $rr) { + // pass uid of the message for permission check as we are running as a daemon process with no session. drop_item($rr['id'], (($rr['item_wall']) ? DROPITEM_PHASE1 : DROPITEM_NORMAL), uid: intval($rr['uid'])); - if ($rr['item_wall']) { // The notifier isn't normally invoked unless item_drop is interactive. Master::Summon(['Notifier', 'drop', $rr['id']]); - if ($interval) { usleep($interval); } |