<?php
+
/**
* @file src/Model/GlobalContact.php
* @brief This file includes the GlobalContact class with directory related functions
use Friendica\Model\Profile;
use Friendica\Network\Probe;
use Friendica\Protocol\PortableContact;
+use Friendica\Util\Network;
+use Friendica\Util\Temporal;
use dba;
use Exception;
require_once 'include/datetime.php';
require_once 'include/dba.php';
-require_once 'include/network.php';
require_once 'include/html2bbcode.php';
/**
intval($uid),
intval($gcid),
intval($zcid),
- dbesc(datetime_convert())
+ dbesc(Temporal::convert())
);
} else {
q(
"UPDATE `glink` SET `updated` = '%s' WHERE `cid` = %d AND `uid` = %d AND `gcid` = %d AND `zcid` = %d",
- dbesc(datetime_convert()),
+ dbesc(Temporal::convert()),
intval($cid),
intval($uid),
intval($gcid),
$done[] = System::baseUrl() . '/poco';
if (strlen(Config::get('system', 'directory'))) {
- $x = fetch_url(get_server()."/pubsites");
+ $x = Network::fetchUrl(get_server()."/pubsites");
if ($x) {
$j = json_decode($x);
if ($j->entries) {
dbesc($contact["url"]),
dbesc(normalise_link($contact["url"])),
dbesc($contact["photo"]),
- dbesc(datetime_convert()),
- dbesc(datetime_convert()),
+ dbesc(Temporal::convert()),
+ dbesc(Temporal::convert()),
dbesc($contact["location"]),
dbesc($contact["about"]),
intval($contact["hide"]),
/**
* @brief Fetches users of given GNU Social server
*
- * If the "Statistics" plugin is enabled (See http://gstools.org/ for details) we query user data with this.
+ * If the "Statistics" addon is enabled (See http://gstools.org/ for details) we query user data with this.
*
* @param string $server Server address
* @return void
$url = $server."/main/statistics";
- $result = z_fetch_url($url);
+ $result = Network::curl($url);
if (!$result["success"]) {
return false;
}
foreach ($r as $server) {
self::fetchGsUsers($server["url"]);
- q("UPDATE `gserver` SET `last_poco_query` = '%s' WHERE `nurl` = '%s'", dbesc(datetime_convert()), dbesc($server["nurl"]));
+ q("UPDATE `gserver` SET `last_poco_query` = '%s' WHERE `nurl` = '%s'", dbesc(Temporal::convert()), dbesc($server["nurl"]));
}
}