From 464149e22d2654fc548e4c7090358d9007bc8031 Mon Sep 17 00:00:00 2001 From: Mario Date: Fri, 28 Jun 2024 18:18:35 +0000 Subject: fail to import more gracefully if a channel has already been imported at some point but was deleted again --- Zotlabs/Module/Import.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Zotlabs/Module/Import.php b/Zotlabs/Module/Import.php index 24b7498dd..5ace4e72d 100644 --- a/Zotlabs/Module/Import.php +++ b/Zotlabs/Module/Import.php @@ -192,6 +192,12 @@ class Import extends Controller { return; } + if ($channel['channel_removed']) { + logger('Channel exists but has been marked removed on this hub. ', print_r($channel,true)); + notice( t('Channel exists but has been marked removed on this hub. Import failed.') . EOL); + return; + } + if (is_array($data['config'])) { import_config($channel, $data['config']); } @@ -558,7 +564,7 @@ class Import extends Controller { goaway(z_root() . '/import_progress'); } - if (!$cf_api_compat) { + if ($import_posts && !$cf_api_compat) { notice(t('Automatic content and files import was not possible due to API version incompatiblity. Please import content and files manually!') . EOL); } -- cgit v1.2.3