X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FDFRN.php;h=1fcaaba7f706a7b2c57fc26676fbc2ac8d8791dc;hb=a670d478f83772394520991fa851394d592bbfc3;hp=b29a3676ad062ba01368321bc5d8c5877fd34d31;hpb=4eec2804de78a6aeb30f843b3b295a563f78a3fe;p=friendica.git diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index b29a3676ad..1fcaaba7f7 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -2220,8 +2220,8 @@ class DFRN GServer::setProtocol($importer['gsid'], Post\DeliveryData::DFRN); } - // is it a public forum? Private forums aren't exposed with this method - $forum = intval(XML::getFirstNodeValue($xpath, '/atom:feed/dfrn:community/text()')); + // is it a public group? Private groups aren't exposed with this method + $group = intval(XML::getFirstNodeValue($xpath, '/atom:feed/dfrn:community/text()')); // The account type is new since 3.5.1 if ($xpath->query('/atom:feed/dfrn:account_type')->length > 0) { @@ -2235,17 +2235,17 @@ class DFRN // Updating the public contact as well Contact::update(['contact-type' => $accounttype], ['uid' => 0, 'nurl' => $importer['nurl']]); } - // A forum contact can either have set "forum" or "prv" - but not both + // A group contact can either have set "forum" or "prv" - but not both if ($accounttype == User::ACCOUNT_TYPE_COMMUNITY) { - // It's a forum, so either set the public or private forum flag - $condition = ['(`forum` != ? OR `prv` != ?) AND `id` = ?', $forum, !$forum, $importer['id']]; - Contact::update(['forum' => $forum, 'prv' => !$forum], $condition); + // It's a group, so either set the public or private forum flag + $condition = ['(`forum` != ? OR `prv` != ?) AND `id` = ?', $group, !$group, $importer['id']]; + Contact::update(['forum' => $group, 'prv' => !$group], $condition); // Updating the public contact as well - $condition = ['(`forum` != ? OR `prv` != ?) AND `uid` = 0 AND `nurl` = ?', $forum, !$forum, $importer['nurl']]; - Contact::update(['forum' => $forum, 'prv' => !$forum], $condition); + $condition = ['(`forum` != ? OR `prv` != ?) AND `uid` = 0 AND `nurl` = ?', $group, !$group, $importer['nurl']]; + Contact::update(['forum' => $group, 'prv' => !$group], $condition); } else { - // It's not a forum, so remove the flags + // It's not a group, so remove the flags $condition = ['(`forum` OR `prv`) AND `id` = ?', $importer['id']]; Contact::update(['forum' => false, 'prv' => false], $condition); @@ -2253,13 +2253,13 @@ class DFRN $condition = ['(`forum` OR `prv`) AND `uid` = 0 AND `nurl` = ?', $importer['nurl']]; Contact::update(['forum' => false, 'prv' => false], $condition); } - } elseif ($forum != $importer['forum']) { // Deprecated since 3.5.1 - $condition = ['`forum` != ? AND `id` = ?', $forum, $importer['id']]; - Contact::update(['forum' => $forum], $condition); + } elseif ($group != $importer['forum']) { // Deprecated since 3.5.1 + $condition = ['`forum` != ? AND `id` = ?', $group, $importer['id']]; + Contact::update(['forum' => $group], $condition); // Updating the public contact as well - $condition = ['`forum` != ? AND `uid` = 0 AND `nurl` = ?', $forum, $importer['nurl']]; - Contact::update(['forum' => $forum], $condition); + $condition = ['`forum` != ? AND `uid` = 0 AND `nurl` = ?', $group, $importer['nurl']]; + Contact::update(['forum' => $group], $condition); }