]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/PortableContact.php
Remove deprecated code
[friendica.git] / src / Protocol / PortableContact.php
index 9ba6a4b9008b91eabe5e6691ec71d8ac629d2aba..58b9d738746e2debd3c55233d6420e055b9fd520 100644 (file)
@@ -9,25 +9,18 @@
 
 namespace Friendica\Protocol;
 
-use DOMDocument;
-use DOMXPath;
 use Exception;
 use Friendica\Content\Text\HTML;
-use Friendica\Core\Config;
 use Friendica\Core\Logger;
 use Friendica\Core\Protocol;
 use Friendica\Core\Worker;
 use Friendica\Database\DBA;
-use Friendica\Model\Contact;
+use Friendica\DI;
 use Friendica\Model\GContact;
 use Friendica\Model\GServer;
-use Friendica\Model\Profile;
-use Friendica\Module\Register;
-use Friendica\Network\Probe;
 use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Network;
 use Friendica\Util\Strings;
-use Friendica\Util\XML;
 
 class PortableContact
 {
@@ -37,7 +30,7 @@ class PortableContact
        const USERS_GCONTACTS_FALLBACK = 3;
 
        /**
-        * @brief Fetch POCO data
+        * Fetch POCO data
         *
         * @param integer $cid  Contact ID
         * @param integer $uid  User ID
@@ -61,7 +54,7 @@ class PortableContact
        }
 
        /**
-        * @brief Fetch POCO data from the worker
+        * Fetch POCO data from the worker
         *
         * @param integer $cid  Contact ID
         * @param integer $uid  User ID
@@ -215,7 +208,7 @@ class PortableContact
        }
 
        /**
-        * @brief Returns a list of all known servers
+        * Returns a list of all known servers
         * @return array List of server urls
         * @throws Exception
         */
@@ -239,7 +232,7 @@ class PortableContact
        }
 
        /**
-        * @brief Fetch server list from remote servers and adds them when they are new.
+        * Fetch server list from remote servers and adds them when they are new.
         *
         * @param string $poco URL to the POCO endpoint
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
@@ -295,8 +288,8 @@ class PortableContact
                                self::discoverServer($data, 2);
                        }
 
-                       if (Config::get('system', 'poco_discovery') >= self::USERS_GCONTACTS) {
-                               $timeframe = Config::get('system', 'poco_discovery_since');
+                       if (DI::config()->get('system', 'poco_discovery') >= self::USERS_GCONTACTS) {
+                               $timeframe = DI::config()->get('system', 'poco_discovery_since');
 
                                if ($timeframe == 0) {
                                        $timeframe = 30;
@@ -320,7 +313,7 @@ class PortableContact
                                        }
                                }
 
-                               if (!$success && !empty($data) && Config::get('system', 'poco_discovery') >= self::USERS_GCONTACTS_FALLBACK) {
+                               if (!$success && !empty($data) && DI::config()->get('system', 'poco_discovery') >= self::USERS_GCONTACTS_FALLBACK) {
                                        Logger::info("Fetch contacts from users of the server " . $server["nurl"]);
                                        self::discoverServerUsers($data, $server);
                                }