aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/Cron.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-12-04 10:25:11 +0000
committerMario <mario@mariovavti.com>2019-12-04 10:25:11 +0000
commitbde429cff649237984903a252ba1a718e6d74f53 (patch)
treeb2b2570159cfb37689e6ce3b96c3b1b988d676cc /Zotlabs/Daemon/Cron.php
parentcc9f41df5f83bcab435d6fb941b5a8f5b1457037 (diff)
parent4c8d33d1eb2a804aa70a7bc677d6c73d0d94816b (diff)
downloadvolse-hubzilla-4.6.tar.gz
volse-hubzilla-4.6.tar.bz2
volse-hubzilla-4.6.zip
Merge branch '4.6RC'4.6
Diffstat (limited to 'Zotlabs/Daemon/Cron.php')
-rw-r--r--Zotlabs/Daemon/Cron.php17
1 files changed, 8 insertions, 9 deletions
diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php
index fe356bcbf..8fa31e6ce 100644
--- a/Zotlabs/Daemon/Cron.php
+++ b/Zotlabs/Daemon/Cron.php
@@ -97,13 +97,17 @@ class Cron {
// Clean expired photos from cache
- $age = get_config('system','active_expire_days', '30');
$r = q("SELECT DISTINCT xchan, content FROM photo WHERE photo_usage = %d AND expires < %s - INTERVAL %s",
intval(PHOTO_CACHE),
- db_utcnow(),
- db_quoteinterval($age . ' DAY')
+ db_utcnow(),
+ db_quoteinterval(get_config('system','active_expire_days', '30') . ' DAY')
);
if($r) {
+ q("DELETE FROM photo WHERE photo_usage = %d AND expires < %s - INTERVAL %s",
+ intval(PHOTO_CACHE),
+ db_utcnow(),
+ db_quoteinterval(get_config('system','active_expire_days', '30') . ' DAY')
+ );
foreach($r as $rr) {
$file = dbunescbin($rr['content']);
if(is_file($file)) {
@@ -113,11 +117,6 @@ class Cron {
}
}
}
- q("DELETE FROM photo WHERE photo_usage = %d AND expires < %s - INTERVAL %s",
- intval(PHOTO_CACHE),
- db_utcnow(),
- db_quoteinterval($age . ' DAY')
- );
// publish any applicable items that were set to be published in the future
// (time travel posts). Restrict to items that have come of age in the last
@@ -215,7 +214,7 @@ class Cron {
$restart = true;
$generation = intval($argv[2]);
if(! $generation)
- killme();
+ return;
}
reload_plugins();