From 2e59eec35dbaa302a625c2a15ecb19db38fe3e2a Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 29 Oct 2016 22:06:18 +0000 Subject: [PATCH] Added some comments --- include/items.php | 7 ++----- include/threads.php | 9 ++++++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/include/items.php b/include/items.php index 41d13616ea..93df36fb39 100644 --- a/include/items.php +++ b/include/items.php @@ -922,11 +922,8 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa create_tags_from_item($current_post); create_files_from_item($current_post); - /** - * If this is now the last-child, force all _other_ children of this parent to *not* be last-child - * It is done after the transaction to avoid dead locks. - */ - + // If this is now the last-child, force all _other_ children of this parent to *not* be last-child + // It is done after the transaction to avoid dead locks. if ($arr['last-child']) { $r = q("UPDATE `item` SET `last-child` = 0 WHERE `parent-uri` = '%s' AND `uid` = %d AND `id` != %d", dbesc($arr['uri']), diff --git a/include/threads.php b/include/threads.php index 8dfb412525..3d9b656ea3 100644 --- a/include/threads.php +++ b/include/threads.php @@ -23,7 +23,7 @@ function add_thread($itemid, $onlyshadow = false) { } /** - * @brief Add a shadow entry for a given item id + * @brief Add a shadow entry for a given item id that is a thread starter * * We store every public item entry additionally with the user id "0". * This is used for the community page and for the search. @@ -113,6 +113,13 @@ function add_shadow_thread($itemid) { } } +/** + * @brief Add a shadow entry for a given item id that is a comment + * + * This function does the same like the function above - but for comments + * + * @param integer $itemid Item ID that should be added + */ function add_shadow_entry($itemid) { $items = q("SELECT * FROM `item` WHERE `id` = %d", intval($itemid)); -- 2.39.5