X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FDFRN.php;h=5fceab3264d7ab9cc70056c7db2486db4c991124;hb=8cbdc7939e8fc8466ea282d58afb9de564f7a9b6;hp=31d363a118eb2091862751833542ab3c2472b22d;hpb=be0a1023335327e27e463e97156e6b84f325f96f;p=friendica.git diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index 31d363a118..5fceab3264 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -257,7 +257,7 @@ class DFRN STRAIGHT_JOIN `contact` ON `contact`.`id` = `item`.`contact-id` WHERE `item`.`uid` = %d AND `item`.`wall` AND `item`.`changed` > '%s' AND `item`.`visible` $sql_extra - ORDER BY `item`.`parent` ".$sort.", `item`.`created` ASC LIMIT 0, 300", + ORDER BY `item`.`parent` ".$sort.", `item`.`received` ASC LIMIT 0, 300", intval($owner_id), DBA::escape($check_date), DBA::escape($sort) @@ -1455,6 +1455,11 @@ class DFRN $dest_url = ($public_batch ? $contact["batch"] : $contact["notify"]); + if (empty($dest_url)) { + Logger::info('Empty destination', ['public' => $public_batch, 'contact' => $contact]); + return -24; + } + $content_type = ($public_batch ? "application/magic-envelope+xml" : "application/json"); $postResult = Network::post($dest_url, $envelope, ["Content-Type: ".$content_type]); @@ -1688,13 +1693,12 @@ class DFRN 'location' => $contact['location'], 'addr' => $contact['addr'], 'keywords' => $contact['keywords'], 'bdyear' => $contact['bdyear'], 'bd' => $contact['bd'], 'hidden' => $contact['hidden'], 'xmpp' => $contact['xmpp'], 'name-date' => DateTimeFormat::utc($contact['name-date']), - 'uri-date' => DateTimeFormat::utc($contact['uri-date'])]; + 'unsearchable' => $contact['hidden'], 'uri-date' => DateTimeFormat::utc($contact['uri-date'])]; DBA::update('contact', $fields, ['id' => $contact['id'], 'network' => $contact['network']], $contact_old); // Update the public contact. Don't set the "hidden" value, this is used differently for public contacts unset($fields['hidden']); - $fields['unsearchable'] = $hide; $condition = ['uid' => 0, 'nurl' => Strings::normaliseLink($contact_old['url'])]; DBA::update('contact', $fields, $condition, true);