aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Importdoc.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Daemon/Importdoc.php')
-rw-r--r--Zotlabs/Daemon/Importdoc.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/Zotlabs/Daemon/Importdoc.php b/Zotlabs/Daemon/Importdoc.php
index 46f96098f..de571848e 100644
--- a/Zotlabs/Daemon/Importdoc.php
+++ b/Zotlabs/Daemon/Importdoc.php
@@ -11,15 +11,18 @@ class Importdoc {
self::update_docs_dir('doc/*');
+ $sys = get_sys_channel();
+
// remove old files that weren't updated (indicates they were most likely deleted).
- $i = q("select id, uid from item where item_type = 5 and edited < %s - INTERVAL %s",
+ $i = q("select id from item where uid = %d and item_type = 5 and edited < %s - INTERVAL %s",
+ intval($sys['channel_id']),
db_utcnow(),
db_quoteinterval('14 DAY')
);
if ($i) {
foreach ($i as $iv) {
- drop_item($iv['id'], uid: $iv['uid']);
+ drop_item($iv['id'], uid: $sys['channel_id']);
}
}