mirror of
https://github.com/friendica/friendica
synced 2025-04-28 00:30:10 +00:00
New item field "Post-type" and new table "permissionset" (#5408)
* "post-type" replaces "bookmark" and "type" * Removed some more type * Added index to permission set * The permission set is now stored * The permission set is now removed upon expiry * Post update now stores the permission set * New file * Permissions are now sorted * Changed documentation
This commit is contained in:
parent
0b38f1c58b
commit
5af9596dde
29 changed files with 222 additions and 145 deletions
|
@ -1017,7 +1017,7 @@ class DFRN
|
|||
XML::addElement($doc, $entry, "dfrn:extid", $item['extid']);
|
||||
}
|
||||
|
||||
if ($item['bookmark']) {
|
||||
if ($item['post-type'] == Item::PT_PAGE) {
|
||||
XML::addElement($doc, $entry, "dfrn:bookmark", "true");
|
||||
}
|
||||
|
||||
|
@ -2308,7 +2308,6 @@ class DFRN
|
|||
|| ($item["verb"] == ACTIVITY_ATTENDMAYBE)
|
||||
) {
|
||||
$is_like = true;
|
||||
$item["type"] = "activity";
|
||||
$item["gravity"] = GRAVITY_ACTIVITY;
|
||||
// only one like or dislike per person
|
||||
// splitted into two queries for performance issues
|
||||
|
@ -2489,7 +2488,7 @@ class DFRN
|
|||
$item["extid"] = XML::getFirstNodeValue($xpath, "dfrn:extid/text()", $entry);
|
||||
|
||||
if (XML::getFirstNodeValue($xpath, "dfrn:bookmark/text()", $entry) == "true") {
|
||||
$item["bookmark"] = true;
|
||||
$item["post-type"] = Item::PT_PAGE;
|
||||
}
|
||||
|
||||
$notice_info = $xpath->query("statusnet:notice_info", $entry);
|
||||
|
@ -2621,7 +2620,6 @@ class DFRN
|
|||
}
|
||||
|
||||
if ($entrytype == DFRN::REPLY_RC) {
|
||||
$item["type"] = "remote-comment";
|
||||
$item["wall"] = 1;
|
||||
} elseif ($entrytype == DFRN::TOP_LEVEL) {
|
||||
if (!isset($item["object-type"])) {
|
||||
|
@ -2829,7 +2827,6 @@ class DFRN
|
|||
$header = [];
|
||||
$header["uid"] = $importer["importer_uid"];
|
||||
$header["network"] = NETWORK_DFRN;
|
||||
$header["type"] = "remote";
|
||||
$header["wall"] = 0;
|
||||
$header["origin"] = 0;
|
||||
$header["contact-id"] = $importer["id"];
|
||||
|
|
|
@ -1709,7 +1709,6 @@ class Diaspora
|
|||
$datarray["guid"] = $guid;
|
||||
$datarray["uri"] = self::getUriFromGuid($author, $guid);
|
||||
|
||||
$datarray["type"] = "remote-comment";
|
||||
$datarray["verb"] = ACTIVITY_POST;
|
||||
$datarray["gravity"] = GRAVITY_COMMENT;
|
||||
|
||||
|
@ -1998,7 +1997,6 @@ class Diaspora
|
|||
$datarray["guid"] = $guid;
|
||||
$datarray["uri"] = self::getUriFromGuid($author, $guid);
|
||||
|
||||
$datarray["type"] = "activity";
|
||||
$datarray["verb"] = $verb;
|
||||
$datarray["gravity"] = GRAVITY_ACTIVITY;
|
||||
$datarray["parent-uri"] = $parent_item["uri"];
|
||||
|
|
|
@ -190,7 +190,6 @@ class Feed {
|
|||
$header = [];
|
||||
$header["uid"] = $importer["uid"];
|
||||
$header["network"] = NETWORK_FEED;
|
||||
$header["type"] = "remote";
|
||||
$header["wall"] = 0;
|
||||
$header["origin"] = 0;
|
||||
$header["gravity"] = GRAVITY_PARENT;
|
||||
|
|
|
@ -345,7 +345,6 @@ class OStatus
|
|||
$header = [];
|
||||
$header["uid"] = $importer["uid"];
|
||||
$header["network"] = NETWORK_OSTATUS;
|
||||
$header["type"] = "remote-comment";
|
||||
$header["wall"] = 0;
|
||||
$header["origin"] = 0;
|
||||
$header["gravity"] = GRAVITY_COMMENT;
|
||||
|
@ -457,7 +456,6 @@ class OStatus
|
|||
$orig_uri = $xpath->query("activity:object/atom:id", $entry)->item(0)->nodeValue;
|
||||
logger("Favorite ".$orig_uri." ".print_r($item, true));
|
||||
|
||||
$item["type"] = "activity";
|
||||
$item["verb"] = ACTIVITY_LIKE;
|
||||
$item["parent-uri"] = $orig_uri;
|
||||
$item["gravity"] = GRAVITY_ACTIVITY;
|
||||
|
@ -696,7 +694,6 @@ class OStatus
|
|||
} else {
|
||||
$item["parent-uri"] = $item["uri"];
|
||||
$item["gravity"] = GRAVITY_PARENT;
|
||||
$item["type"] = "remote";
|
||||
}
|
||||
|
||||
if (($item['author-link'] != '') && !empty($item['protocol'])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue