aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon/File_importer.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Daemon/File_importer.php')
-rw-r--r--Zotlabs/Daemon/File_importer.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/Zotlabs/Daemon/File_importer.php b/Zotlabs/Daemon/File_importer.php
index bb12cdf70..28fb172a7 100644
--- a/Zotlabs/Daemon/File_importer.php
+++ b/Zotlabs/Daemon/File_importer.php
@@ -48,12 +48,18 @@ class File_importer {
$j = json_decode($x['body'],true);
- if(! is_array($j[0]['attach']) || ! count($j[0]['attach'])) {
- PConfig::Set($channel['channel_id'], 'import', 'files', 1);
+ if(! is_array($j['results'][0]['attach']) || ! count($j['results'][0]['attach'])) {
return;
}
- $r = sync_files($channel,$j);
+ $r = sync_files($channel, $j['results']);
+
+ PConfig::Set($channel['channel_id'], 'import', 'files_progress', [
+ 'files_total' => $j['total'],
+ 'files_page' => 1, // export page atm returns just one file
+ 'last_page' => $page,
+ 'next_cmd' => ['File_importer',sprintf('%d',$page + 1), $channel['channel_address'], urlencode($hz_server)]
+ ]);
$page++;