X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FGContact.php;h=337a938a747c86fc2d307355753bd63e13a1ae55;hb=297a549590844568c21137a936ec2a2c1eafd79b;hp=1fed1fc3ef5b8464f521814dc99b3976b17a9ec9;hpb=b5fa5189989dace50ac819cb169344d1134e1fdf;p=friendica.git diff --git a/src/Model/GContact.php b/src/Model/GContact.php index 1fed1fc3ef..337a938a74 100644 --- a/src/Model/GContact.php +++ b/src/Model/GContact.php @@ -19,8 +19,6 @@ use Friendica\Util\DateTimeFormat; use Friendica\Util\Network; use Friendica\Util\Strings; -require_once 'include/dba.php'; - /** * @brief This class handles GlobalContact related functions */ @@ -520,7 +518,7 @@ class GContact */ public static function updateSuggestions() { - $a = get_app(); + $a = \get_app(); $done = []; @@ -864,7 +862,7 @@ class GContact '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']); } @@ -966,8 +964,8 @@ class GContact $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://"; @@ -976,8 +974,8 @@ class GContact $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://";