From 6ff5c23d50095e5407bf69f8a4ec2220c5d2d408 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 31 Mar 2016 00:14:51 +0200 Subject: [PATCH] Doxygen structure added --- include/ostatus.php | 240 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 238 insertions(+), 2 deletions(-) diff --git a/include/ostatus.php b/include/ostatus.php index ba5b80cd5d..dcbd91f415 100644 --- a/include/ostatus.php +++ b/include/ostatus.php @@ -1,4 +1,8 @@ createElement("source"); xml::add_element($doc, $source, "id", $contact["poll"]); @@ -1413,6 +1561,14 @@ class ostatus { return $source; } + /** + * @brief + * + * @param $url + * @param $owner + * + * @return + */ private function contact_entry($url, $owner) { $r = q("SELECT * FROM `contact` WHERE `nurl` = '%s' AND `uid` IN (0, %d) ORDER BY `uid` DESC LIMIT 1", @@ -1447,6 +1603,17 @@ class ostatus { return $contact; } + /** + * @brief + * + * @param $doc + * @param $item + * @param $owner + * @param $repeated_guid + * @param $toplevel + * + * @return + */ private function reshare_entry($doc, $item, $owner, $repeated_guid, $toplevel) { if (($item["id"] != $item["parent"]) AND (normalise_link($item["author-link"]) != normalise_link($owner["url"]))) { @@ -1473,8 +1640,6 @@ class ostatus { $as_object = $doc->createElement("activity:object"); -// ostatusWaEeYs -// ostatusogu9zg - besser xml::add_element($doc, $as_object, "activity:object-type", NAMESPACE_ACTIVITY_SCHEMA."activity"); self::entry_content($doc, $as_object, $repeated_item, $owner, "", "", false); @@ -1505,6 +1670,16 @@ class ostatus { return $entry; } + /** + * @brief + * + * @param $doc + * @param $item + * @param $owner + * @param $toplevel + * + * @return + */ private function like_entry($doc, $item, $owner, $toplevel) { if (($item["id"] != $item["parent"]) AND (normalise_link($item["author-link"]) != normalise_link($owner["url"]))) { @@ -1532,6 +1707,16 @@ class ostatus { return $entry; } + /** + * @brief + * + * @param $doc + * @param $item + * @param $owner + * @param $toplevel + * + * @return + */ private function note_entry($doc, $item, $owner, $toplevel) { if (($item["id"] != $item["parent"]) AND (normalise_link($item["author-link"]) != normalise_link($owner["url"]))) { @@ -1549,6 +1734,16 @@ class ostatus { return $entry; } + /** + * @brief + * + * @param $doc + * @param $entry + * @param $owner + * @param $toplevel + * + * @return + */ private function entry_header($doc, &$entry, $owner, $toplevel) { if (!$toplevel) { $entry = $doc->createElement("entry"); @@ -1572,6 +1767,19 @@ class ostatus { return $title; } + /** + * @brief + * + * @param $doc + * @param $entry + * @param $item + * @param $owner + * @param $title + * @param $verb + * @param $complete + * + * @return + */ private function entry_content($doc, $entry, $item, $owner, $title, $verb = "", $complete = true) { if ($verb == "") @@ -1601,6 +1809,17 @@ class ostatus { xml::add_element($doc, $entry, "updated", datetime_convert("UTC","UTC",$item["edited"]."+00:00",ATOM_TIME)); } + /** + * @brief + * + * @param $doc + * @param $entry + * @param $item + * @param $owner + * @param $complete + * + * @return + */ private function entry_footer($doc, $entry, $item, $owner, $complete = true) { $mentioned = array(); @@ -1697,6 +1916,15 @@ class ostatus { } } + /** + * @brief + * + * @param $a + * @param $owner_nick + * @param $last_update + * + * @return + */ public static function feed(&$a, $owner_nick, $last_update) { $r = q("SELECT `contact`.*, `user`.`nickname`, `user`.`timezone`, `user`.`page-flags` @@ -1746,6 +1974,14 @@ class ostatus { return(trim($doc->saveXML())); } + /** + * @brief + * + * @param $item + * @param $owner + * + * @return + */ public static function salmon($item,$owner) { $doc = new DOMDocument('1.0', 'utf-8'); -- 2.39.5