]> git.mxchange.org Git - friendica.git/commitdiff
API: add docs to `api_item_get_user()`
authorfabrixxm <fabrix.xm@gmail.com>
Thu, 14 Jul 2016 11:35:36 +0000 (13:35 +0200)
committerfabrixxm <fabrix.xm@gmail.com>
Thu, 14 Jul 2016 11:36:15 +0000 (13:36 +0200)
and remove commented out lines

include/api.php

index 4a3d60969362c91dcc695d33ab2473f3aa391b2f..1d4f5d58745b3333ca56cd7cc93ab98fe9b01052 100644 (file)
 
        }
 
+       /**
+        * @brief return api-formatted array for item's author and owner
+        *
+        * @param App $a
+        * @param array $item : item from db
+        * @return array(array:author, array:owner)
+        */
        function api_item_get_user(&$a, $item) {
 
                // Make sure that there is an entry in the global contacts for author and owner
                get_gcontact_id(array("url" => $item['owner-link'], "network" => $item['network'],
                                        "photo" => $item['owner-avatar'], "name" => $item['owner-name']));
 
-               // Comments in threads may appear as wall-to-wall postings.
-               // So only take the owner at the top posting.
-               #if ($item["id"] == $item["parent"])
-               #       $status_user = api_get_user($a,$item["owner-link"]);
-               #else
-
                $status_user = api_get_user($a,$item["author-link"]);
                $status_user["protected"] = (($item["allow_cid"] != "") OR
                                                ($item["allow_gid"] != "") OR