From dd515da889d642ae68210a8b7e91ac587d3cdee7 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Wed, 19 Jun 2019 23:13:53 +0200 Subject: Remove cached photo location directory on delete if empty --- Zotlabs/Daemon/Cron.php | 1 + 1 file changed, 1 insertion(+) (limited to 'Zotlabs/Daemon/Cron.php') diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php index 8b6b42c8a..c99892ffb 100644 --- a/Zotlabs/Daemon/Cron.php +++ b/Zotlabs/Daemon/Cron.php @@ -108,6 +108,7 @@ class Cron { $file = dbunescbin($rr['content']); if(is_file($file)) { @unlink($file); + @rmdir(dirname($file)); logger('info: deleted cached photo file ' . $file, LOGGER_DEBUG); } } -- cgit v1.2.3 From 81ecea29c839c8f914be59acbddd4955673ee2f6 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Mon, 22 Jul 2019 19:11:52 +0200 Subject: reflect repeats in notifications, use force flag for import_xchan_photo() in cron --- Zotlabs/Daemon/Cron.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Daemon/Cron.php') diff --git a/Zotlabs/Daemon/Cron.php b/Zotlabs/Daemon/Cron.php index c99892ffb..fe356bcbf 100644 --- a/Zotlabs/Daemon/Cron.php +++ b/Zotlabs/Daemon/Cron.php @@ -188,7 +188,7 @@ class Cron { if($r) { require_once('include/photo/photo_driver.php'); foreach($r as $rr) { - $photos = import_xchan_photo($rr['xchan_photo_l'],$rr['xchan_hash']); + $photos = import_xchan_photo($rr['xchan_photo_l'], $rr['xchan_hash'], false, true); $x = q("update xchan set xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s' where xchan_hash = '%s'", dbesc($photos[0]), -- cgit v1.2.3