aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-12-07 23:25:59 +0000
committerMario <mario@mariovavti.com>2024-12-07 23:25:59 +0000
commit9756023e39cb58081b68644e23322cb69c8f0833 (patch)
tree73033b6a6ec3a918c718f6a17ca7ccd7b733af4f
parentbb0a22ee582c7268431ccb6e44ffc6378ca00093 (diff)
downloadvolse-hubzilla-9756023e39cb58081b68644e23322cb69c8f0833.tar.gz
volse-hubzilla-9756023e39cb58081b68644e23322cb69c8f0833.tar.bz2
volse-hubzilla-9756023e39cb58081b68644e23322cb69c8f0833.zip
fix expiration
-rw-r--r--Zotlabs/Daemon/Cron.php7
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);
}