From a2ee4e845c0278bb7096c3c2cce6e0a4d734808c Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 16 Sep 2023 04:39:42 +0300 Subject: [PATCH] fix profiles export without account type provided, because throws access warning on import --- src/crontab/export/feed.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/crontab/export/feed.php b/src/crontab/export/feed.php index 26afc09..09922b1 100644 --- a/src/crontab/export/feed.php +++ b/src/crontab/export/feed.php @@ -199,7 +199,7 @@ try foreach ($db->getUsers() as $user) { // Dump public data only - if ($user->public === '1') + if ($user->public) { $users[] = (object) [ @@ -236,7 +236,10 @@ try foreach ($db->getMagnets($user->userId) as $magnet) { // Dump public data only - if ($magnet->public === '1') + if ($magnet->public && + $public['user'][$magnet->userId]) // After upgrade, some users have not updated their public status. + // Remote node have warning on import, because user info still hidden to init new profile there. + // Stop magnets export without public profile available, even magnet is public. { // Info Hash $xt = [];