From: Michael Date: Mon, 26 Mar 2018 06:11:55 +0000 (+0000) Subject: Only add tags in the "tags" scope X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6b84cb97153864fc94f90ef97a61caf7803eed74;p=friendica.git Only add tags in the "tags" scope --- diff --git a/src/Protocol/PortableContact.php b/src/Protocol/PortableContact.php index c7f58b9fb2..9c7ad538cc 100644 --- a/src/Protocol/PortableContact.php +++ b/src/Protocol/PortableContact.php @@ -1378,7 +1378,7 @@ class PortableContact dba::insert('gserver', $fields); } - if (in_array($fields['network'], [NETWORK_DFRN, NETWORK_DIASPORA])) { + if (!$failure && in_array($fields['network'], [NETWORK_DFRN, NETWORK_DIASPORA])) { self::discoverRelay(server_url); } @@ -1410,8 +1410,10 @@ class PortableContact dba::update('gserver', $fields, ['id' => $gserver['id']]); dba::delete('gserver-tag', ['gserver-id' => $gserver['id']]); - foreach ($data->tags as $tag) { - dba::insert('gserver-tag', ['gserver-id' => $gserver['id'], 'tag' => $tag]); + if ($data->scope == 'tags') { + foreach ($data->tags as $tag) { + dba::insert('gserver-tag', ['gserver-id' => $gserver['id'], 'tag' => $tag]); + } } }