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
{
const USERS_GCONTACTS_FALLBACK = 3;
/**
- * @brief Fetch POCO data
+ * Fetch POCO data
*
* @param integer $cid Contact ID
* @param integer $uid User ID
}
/**
- * @brief Fetch POCO data from the worker
+ * Fetch POCO data from the worker
*
* @param integer $cid Contact ID
* @param integer $uid User ID
}
/**
- * @brief Returns a list of all known servers
+ * Returns a list of all known servers
* @return array List of server urls
* @throws Exception
*/
}
/**
- * @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
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;
}
}
- 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);
}