]> git.mxchange.org Git - friendica.git/commitdiff
Use the correct ids for the search results
authorMichael <heluecht@pirati.ca>
Tue, 28 Mar 2023 10:06:41 +0000 (10:06 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 28 Mar 2023 10:06:41 +0000 (10:06 +0000)
src/Core/Search.php

index 3c0ace3db5468d62486f7cfc2d1236a75b9b87c1..b641f2897f14511fe6f965c920d6c2378203e8e9 100644 (file)
@@ -79,7 +79,7 @@ class Search
                                $user_data['url'] ?? '',
                                $user_data['photo'] ?? '',
                                $user_data['network'] ?? '',
-                               $contactDetails['id'] ?? 0,
+                               $contactDetails['cid'] ?? 0,
                                $user_data['id'] ?? 0,
                                $user_data['tags'] ?? ''
                        );
@@ -146,7 +146,7 @@ class Search
                                $profile['photo'] ?? '',
                                Protocol::DFRN,
                                $contactDetails['cid'] ?? 0,
-                               0,
+                               $contactDetails['zid'] ?? 0,
                                $profile['tags'] ?? ''
                        );
 
@@ -179,12 +179,12 @@ class Search
                        $result = new ContactResult(
                                $contact['name'],
                                $contact['addr'],
-                               $contact['addr'],
+                               $contact['addr'] ?: $contact['url'],
                                $contact['url'],
                                $contact['photo'],
                                $contact['network'],
-                               $contact['cid'] ?? 0,
-                               $contact['zid'] ?? 0,
+                               0,
+                               $contact['pid'],
                                $contact['keywords']
                        );