]> git.mxchange.org Git - friendica.git/blobdiff - src/Model/GContact.php
Fixing double encoding here as well
[friendica.git] / src / Model / GContact.php
index 6e2e520c89f58239f4cd3088412a002dc72b11ce..44d1edecd78c5dcdf2cec638600e7e8993ee4178 100644 (file)
@@ -430,7 +430,7 @@ class GContact
                //      return $list;
                //}
 
-               $network = [Protocol::DFRN];
+               $network = [Protocol::DFRN, Protocol::ACTIVITYPUB];
 
                if (Config::get('system', 'diaspora_enabled')) {
                        $network[] = Protocol::DIASPORA;
@@ -451,7 +451,7 @@ class GContact
                        where uid = %d and not gcontact.nurl in ( select nurl from contact where uid = %d )
                        AND NOT `gcontact`.`name` IN (SELECT `name` FROM `contact` WHERE `uid` = %d)
                        AND NOT `gcontact`.`id` IN (SELECT `gcid` FROM `gcign` WHERE `uid` = %d)
-                       AND `gcontact`.`updated` >= '%s'
+                       AND `gcontact`.`updated` >= '%s' AND NOT `gcontact`.`hide`
                        AND `gcontact`.`last_contact` >= `gcontact`.`last_failure`
                        AND `gcontact`.`network` IN (%s)
                        GROUP BY `glink`.`gcid` ORDER BY `gcontact`.`updated` DESC,`total` DESC LIMIT %d, %d",
@@ -864,7 +864,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 +966,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 +976,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://";