]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/OStatus.php
Moved global PAGE_* to Profile class (#5500)
[friendica.git] / src / Protocol / OStatus.php
index 33d251fd6113641de1bdc3022e1b2b926432d9e8..dca47e31b9f9d6b9a0b3bad0a70efbcdf3055177 100644 (file)
@@ -1299,7 +1299,7 @@ class OStatus
                        "rel" => "self", "type" => "application/atom+xml"];
                XML::addElement($doc, $root, "link", "", $attributes);
 
-               if ($owner['account-type'] == ACCOUNT_TYPE_COMMUNITY) {
+               if ($owner['account-type'] == Contact::ACCOUNT_TYPE_COMMUNITY) {
                        $condition = ['uid' => $owner['uid'], 'self' => false, 'pending' => false,
                                        'archive' => false, 'hidden' => false, 'blocked' => false];
                        $members = DBA::count('contact', $condition);
@@ -1407,7 +1407,7 @@ class OStatus
                $profile = DBA::selectFirst('profile', ['homepage', 'publish'], ['uid' => $owner['uid'], 'is-default' => true]);
                $author = $doc->createElement("author");
                XML::addElement($doc, $author, "id", $owner["url"]);
-               if ($owner['account-type'] == ACCOUNT_TYPE_COMMUNITY) {
+               if ($owner['account-type'] == Contact::ACCOUNT_TYPE_COMMUNITY) {
                        XML::addElement($doc, $author, "activity:object-type", ACTIVITY_OBJ_GROUP);
                } else {
                        XML::addElement($doc, $author, "activity:object-type", ACTIVITY_OBJ_PERSON);
@@ -1872,7 +1872,7 @@ class OStatus
                        $entry = $doc->createElement("entry");
                        $title = sprintf("New note by %s", $owner["nick"]);
 
-                       if ($owner['account-type'] == ACCOUNT_TYPE_COMMUNITY) {
+                       if ($owner['account-type'] == Contact::ACCOUNT_TYPE_COMMUNITY) {
                                $contact = self::contactEntry($item['author-link'], $owner);
                                $author = self::addAuthor($doc, $contact, false);
                                $entry->appendChild($author);
@@ -2030,8 +2030,8 @@ class OStatus
                foreach ($mentioned as $mention) {
                        $condition = ['uid' => $owner['uid'], 'nurl' => normalise_link($mention)];
                        $contact = DBA::selectFirst('contact', ['forum', 'prv', 'self', 'contact-type'], $condition);
-                       if ($contact["forum"] || $contact["prv"] || ($owner['contact-type'] == ACCOUNT_TYPE_COMMUNITY) ||
-                               ($contact['self'] && ($owner['account-type'] == ACCOUNT_TYPE_COMMUNITY))) {
+                       if ($contact["forum"] || $contact["prv"] || ($owner['contact-type'] == Contact::ACCOUNT_TYPE_COMMUNITY) ||
+                               ($contact['self'] && ($owner['account-type'] == Contact::ACCOUNT_TYPE_COMMUNITY))) {
                                XML::addElement($doc, $entry, "link", "",
                                        [
                                                "rel" => "mentioned",
@@ -2048,7 +2048,7 @@ class OStatus
                        }
                }
 
-               if ($owner['account-type'] == ACCOUNT_TYPE_COMMUNITY) {
+               if ($owner['account-type'] == Contact::ACCOUNT_TYPE_COMMUNITY) {
                        XML::addElement($doc, $entry, "link", "", [
                                "rel" => "mentioned",
                                "ostatus:object-type" => "http://activitystrea.ms/schema/1.0/group",
@@ -2155,7 +2155,7 @@ class OStatus
                        $condition[] = ACTIVITY_OBJ_COMMENT;
                }
 
-               if ($owner['account-type'] != ACCOUNT_TYPE_COMMUNITY) {
+               if ($owner['account-type'] != Contact::ACCOUNT_TYPE_COMMUNITY) {
                        $condition[0] .= " AND `contact-id` = ? AND `author-id` = ?";
                        $condition[] = $owner["id"];
                        $condition[] = $authorid;