]> git.mxchange.org Git - friendica.git/commitdiff
simplification
authorPhilipp Holzer <admin+github@philipp.info>
Mon, 20 May 2019 17:27:53 +0000 (19:27 +0200)
committerPhilipp Holzer <admin+github@philipp.info>
Mon, 20 May 2019 17:27:53 +0000 (19:27 +0200)
src/Core/Search.php

index 0a234d748e35ce846b6867e419fb0c5f879fc975..bd4a81a5f4bd7582115af4ca383514a85ffad7aa 100644 (file)
@@ -52,7 +52,7 @@ class Search extends BaseObject
                        }
 
                        $contactDetails = Contact::getDetailsByURL(defaults($user_data, 'url', ''), local_user());
-                       $itemUrl        = (($contactDetails["addr"] != "") ? $contactDetails["addr"] : defaults($user_data, 'url', ''));
+                       $itemUrl        = defaults($contactDetails, 'addr', defaults($user_data, 'url', ''));
 
                        $result = new ContactResult(
                                defaults($user_data, 'name', ''),
@@ -121,9 +121,7 @@ class Search extends BaseObject
 
                foreach ($profiles as $profile) {
                        $contactDetails = Contact::getDetailsByURL(defaults($profile, 'profile_url', ''), local_user());
-                       $itemUrl        = (!empty($contactDetails['addr']) ?
-                               $contactDetails['addr'] :
-                               defaults($profile, 'profile_url', ''));
+                       $itemUrl        = defaults($contactDetails, 'addr', defaults($profile, 'profile_url', ''));
 
                        $result = new ContactResult(
                                defaults($profile, 'name', ''),