]> git.mxchange.org Git - friendica.git/blobdiff - mod/item.php
Replace remaining instances with "allowlist", "denylist" and "blocklist"
[friendica.git] / mod / item.php
index 30d9f03e6bf40101a63651c7d73e27d5d374d0de..b023b97d19ef5a014edf9192dfc5494def96a27b 100644 (file)
@@ -119,7 +119,7 @@ function item_post(App $a) {
                        // The URI and the contact is taken from the direct parent which needn't to be the top parent
                        $thr_parent_uri = $toplevel_item['uri'];
 
-                       if ($toplevel_item['id'] != $toplevel_item['parent']) {
+                       if ($toplevel_item['gravity'] != GRAVITY_PARENT) {
                                $toplevel_item = Item::selectFirst([], ['id' => $toplevel_item['parent']]);
                        }
                }
@@ -245,7 +245,7 @@ function item_post(App $a) {
                $verb              = $orig_post['verb'];
                $objecttype        = $orig_post['object-type'];
                $app               = $orig_post['app'];
-               $categories        = $orig_post['file'];
+               $categories        = $orig_post['file'] ?? '';
                $title             = Strings::escapeTags(trim($_REQUEST['title']));
                $body              = trim($body);
                $private           = $orig_post['private'];
@@ -650,6 +650,7 @@ function item_post(App $a) {
                // We set the datarray ID to -1 because in preview mode the dataray
                // doesn't have an ID.
                $datarray["id"] = -1;
+               $datarray["uri-id"] = -1;
                $datarray["item_id"] = -1;
                $datarray["author-network"] = Protocol::DFRN;