]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/DFRN.php
Add Contact Object
[friendica.git] / src / Protocol / DFRN.php
index 080dd9adad5a47b6b55f77dd5d5b080bd736fb43..e0daaf3605716ef0159db46fbdf4f2ad09935a42 100644 (file)
@@ -13,17 +13,19 @@ 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 +556,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);
@@ -1675,9 +1677,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 +2108,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 +2754,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 +2942,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"]);
                                }
                        }
                }