X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FDFRN.php;h=592bca83c470334f4655762330309ed699504fbb;hb=1a60401d69e7d340e135c258eb058e88419151e9;hp=080dd9adad5a47b6b55f77dd5d5b080bd736fb43;hpb=6ae43962997d50691b3fdf0fd870f5f68612a587;p=friendica.git diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 080dd9adad..592bca83c4 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -13,17 +13,18 @@ use Friendica\Core\Config; use Friendica\Core\System; use Friendica\Core\Worker; use Friendica\Database\DBM; +use Friendica\Model\GlobalContact; +use Friendica\Object\Contact; +use Friendica\Object\Profile; +use Friendica\Protocol\OStatus; use Friendica\Util\XML; use dba; use DOMDocument; use DomXPath; -use ostatus; -require_once "include/Contact.php"; require_once "include/enotify.php"; require_once "include/threads.php"; -require_once "include/socgraph.php"; require_once "include/items.php"; require_once "include/tags.php"; require_once "include/files.php"; @@ -554,7 +555,7 @@ class DFRN if ($public) { // DFRN itself doesn't uses this. But maybe someone else wants to subscribe to the public feed. - ostatus::hublinks($doc, $root, $owner["nick"]); + OStatus::hublinks($doc, $root, $owner["nick"]); $attributes = array("rel" => "salmon", "href" => System::baseUrl()."/salmon/".$owner["nick"]); XML::add_element($doc, $root, "link", "", $attributes); @@ -706,7 +707,7 @@ class DFRN if (trim($profile["locality"].$profile["region"].$profile["country-name"]) != "") { $element = $doc->createElement("poco:address"); - XML::add_element($doc, $element, "poco:formatted", formatted_location($profile)); + XML::add_element($doc, $element, "poco:formatted", Profile::formatLocation($profile)); if (trim($profile["locality"]) != "") { XML::add_element($doc, $element, "poco:locality", $profile["locality"]); @@ -740,8 +741,7 @@ class DFRN */ private static function add_entry_author($doc, $element, $contact_url, $item) { - - $contact = get_contact_details_by_url($contact_url, $item["uid"]); + $contact = Contact::getDetailsByURL($contact_url, $item["uid"]); $author = $doc->createElement($element); XML::add_element($doc, $author, "name", $contact["name"]); @@ -1371,8 +1371,7 @@ class DFRN if ($contact['term-date'] > NULL_DATE) { logger("dfrn_deliver: $url back from the dead - removing mark for death"); - include_once 'include/Contact.php'; - unmark_for_death($contact); + Contact::unmarkForArchival($contact); } $res = parse_xml_string($xml); @@ -1675,9 +1674,9 @@ class DFRN $poco["photo"] = $author["avatar"]; $poco["hide"] = $hide; $poco["contact-type"] = $contact["contact-type"]; - $gcid = update_gcontact($poco); + $gcid = GlobalContact::update($poco); - link_gcontact($gcid, $importer["uid"], $contact["id"]); + GlobalContact::link($gcid, $importer["uid"], $contact["id"]); } return($author); @@ -2106,7 +2105,7 @@ class DFRN $changed = true; if ($entrytype == DFRN_REPLY_RC) { - Worker::add(PRIORITY_HIGH, "notifier", "comment-import", $current["id"]); + Worker::add(PRIORITY_HIGH, "Notifier", "comment-import", $current["id"]); } } @@ -2752,7 +2751,7 @@ class DFRN if ($posted_id && $parent && ($entrytype == DFRN_REPLY_RC)) { logger("Notifying followers about comment ".$posted_id, LOGGER_DEBUG); - Worker::add(PRIORITY_HIGH, "notifier", "comment-import", $posted_id); + Worker::add(PRIORITY_HIGH, "Notifier", "comment-import", $posted_id); } return true; @@ -2940,7 +2939,7 @@ class DFRN if ($entrytype == DFRN_REPLY_RC) { logger("Notifying followers about deletion of post " . $item["id"], LOGGER_DEBUG); - Worker::add(PRIORITY_HIGH, "notifier", "drop", $item["id"]); + Worker::add(PRIORITY_HIGH, "Notifier", "drop", $item["id"]); } } }