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');