]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/DFRN.php
Add user settings page to manage remote server settings
[friendica.git] / src / Protocol / DFRN.php
index b29a3676ad062ba01368321bc5d8c5877fd34d31..1fcaaba7f706a7b2c57fc26676fbc2ac8d8791dc 100644 (file)
@@ -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);
                }