use Friendica\Util\Network;
use Friendica\Util\Strings;
-require_once 'include/dba.php';
-
/**
* @brief This class handles GlobalContact related functions
*/
*/
public static function updateSuggestions()
{
- $a = get_app();
+ $a = \get_app();
$done = [];
'location' => $contact['location'], 'about' => $contact['about']];
// Don't update the birthday field if not set or invalid
- if (empty($contact['birthday']) || ($contact['birthday'] < '0001-01-01')) {
+ if (empty($contact['birthday']) || ($contact['birthday'] <= DBA::NULL_DATE)) {
unset($fields['bd']);
}
$statistics = json_decode($curlResult->getBody());
- if (!empty($statistics->config)) {
- if ($statistics->config->instance_with_ssl) {
+ if (!empty($statistics->config->instance_address)) {
+ if (!empty($statistics->config->instance_with_ssl)) {
$server = "https://";
} else {
$server = "http://";
$server .= $statistics->config->instance_address;
$hostname = $statistics->config->instance_address;
- } elseif (!empty($statistics)) {
- if ($statistics->instance_with_ssl) {
+ } elseif (!empty($statistics->instance_address)) {
+ if (!empty($statistics->instance_with_ssl)) {
$server = "https://";
} else {
$server = "http://";