]> git.mxchange.org Git - friendica.git/blobdiff - include/items.php
New fields "author-id" and "owner-id" in the item table
[friendica.git] / include / items.php
index 203b7d0eee6755d0699d8261e3d2da2dedae7d46..f5e568306e4765c8a5a467a5ee5d8c7859f68d2b 100644 (file)
@@ -584,6 +584,12 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                                                                 "photo" => $arr['author-avatar'], "name" => $arr['author-name']));
        }
 
+       if ($arr["author-id"] == 0)
+               $arr["author-id"] = get_contact($arr["author-link"], 0);
+
+       if ($arr["owner-id"] == 0)
+               $arr["owner-id"] = get_contact($arr["owner-link"], 0);
+
        if ($arr['guid'] != "") {
                // Checking if there is already an item with the same guid
                logger('checking for an item for user '.$arr['uid'].' on network '.$arr['network'].' with the guid '.$arr['guid'], LOGGER_DEBUG);