From c7876d0c38cdea4982b19fc1324534ac927b5814 Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Thu, 14 Jul 2016 13:35:36 +0200 Subject: [PATCH] API: add docs to `api_item_get_user()` and remove commented out lines --- include/api.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/include/api.php b/include/api.php index 4a3d609693..1d4f5d5874 100644 --- a/include/api.php +++ b/include/api.php @@ -653,6 +653,13 @@ } + /** + * @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 @@ -662,12 +669,6 @@ 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 -- 2.39.5