]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/PortableContact.php
Revert "Move Objects to Model"
[friendica.git] / src / Protocol / PortableContact.php
index 2b37a99624dab2cd5e5fe897697aefa065b6e9a8..84bfd4c4f180978940814c4589f000e47def6dd6 100644 (file)
@@ -12,9 +12,10 @@ namespace Friendica\Protocol;
 use Friendica\Core\Config;
 use Friendica\Core\Worker;
 use Friendica\Database\DBM;
-use Friendica\Model\GContact;
-use Friendica\Model\Profile;
+use Friendica\Model\GlobalContact;
 use Friendica\Network\Probe;
+use Friendica\Object\Photo;
+use Friendica\Object\Profile;
 use dba;
 use DOMDocument;
 use DomXPath;
@@ -192,10 +193,10 @@ class PortableContact
                                        "generation" => $generation);
 
                        try {
-                               $gcontact = GContact::sanitize($gcontact);
-                               $gcid = GContact::update($gcontact);
+                               $gcontact = GlobalContact::sanitize($gcontact);
+                               $gcid = GlobalContact::update($gcontact);
 
-                               GContact::link($gcid, $uid, $cid, $zcid);
+                               GlobalContact::link($gcid, $uid, $cid, $zcid);
                        } catch (Exception $e) {
                                logger($e->getMessage(), LOGGER_DEBUG);
                        }
@@ -424,7 +425,7 @@ class PortableContact
 
                                                $contact = array_merge($contact, $noscrape);
 
-                                               GContact::update($contact);
+                                               GlobalContact::update($contact);
 
                                                if (trim($noscrape["updated"]) != "") {
                                                        q(
@@ -446,7 +447,7 @@ class PortableContact
                if (!$force && !self::updateNeeded($gcontacts[0]["created"], $gcontacts[0]["updated"], $gcontacts[0]["last_failure"], $gcontacts[0]["last_contact"])) {
                        logger("Profile ".$profile." was last updated at ".$gcontacts[0]["updated"]." (cached)", LOGGER_DEBUG);
 
-                       GContact::update($contact);
+                       GlobalContact::update($contact);
                        return $gcontacts[0]["updated"];
                }
 
@@ -467,8 +468,8 @@ class PortableContact
                        $gcontact["server_url"] = $data["baseurl"];
 
                        try {
-                               $gcontact = GContact::sanitize($gcontact);
-                               GContact::update($gcontact);
+                               $gcontact = GlobalContact::sanitize($gcontact);
+                               GlobalContact::update($gcontact);
 
                                self::lastUpdated($data["url"], $force);
                        } catch (Exception $e) {
@@ -494,7 +495,7 @@ class PortableContact
 
                $contact["server_url"] = $data["baseurl"];
 
-               GContact::update($contact);
+               GlobalContact::update($contact);
 
                $feedret = z_fetch_url($data["poll"]);
 
@@ -1600,8 +1601,8 @@ class PortableContact
                                                "generation" => $generation);
 
                                try {
-                                       $gcontact = GContact::sanitize($gcontact);
-                                       GContact::update($gcontact);
+                                       $gcontact = GlobalContact::sanitize($gcontact);
+                                       GlobalContact::update($gcontact);
                                } catch (Exception $e) {
                                        logger($e->getMessage(), LOGGER_DEBUG);
                                }