]> git.mxchange.org Git - friendica.git/blobdiff - mod/item.php
Fix for: empty posts and comments that hadn't been transmitted to Diaspora
[friendica.git] / mod / item.php
index 2830cae2c920ec3bfdc20fbe630ca4df7ef40b8e..be9fa09c478985c2496525ede78ca73fa2c03ce7 100644 (file)
@@ -567,7 +567,7 @@ function item_post(App $a) {
                $network = NETWORK_DFRN;
        }
 
-       $gravity = ($parent ? 6 : 0);
+       $gravity = ($parent ? GRAVITY_COMMENT : GRAVITY_PARENT);
 
        // even if the post arrived via API we are considering that it
        // originated on this site by default for determining relayability.
@@ -737,7 +737,7 @@ function item_post(App $a) {
                goaway($return_path);
        }
 
-       $datarray = dba::selectFirst('item', [], ['id' => $post_id]);
+       $datarray = Item::selectFirst(Item::ITEM_FIELDLIST, ['id' => $post_id]);
 
        if (!DBM::is_result($datarray)) {
                logger("Item with id ".$post_id." couldn't be fetched.");