]> git.mxchange.org Git - friendica.git/commitdiff
Improved fallback when the probing fails
authorMichael <heluecht@pirati.ca>
Tue, 4 Dec 2018 14:17:55 +0000 (14:17 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 4 Dec 2018 14:17:55 +0000 (14:17 +0000)
src/Model/Contact.php

index 5507ba3d1d7bde5e02424cc22d879bbdcdc0b3ea..b5cecd732e122cbb2044516aa7e4120049987e33 100644 (file)
@@ -112,10 +112,8 @@ class Contact extends BaseObject
                        return $data['baseurl'];
                }
 
-               $urlarr = explode('/profile/', $url);
-                $basepath = $urlarr[0];
-
-               return $basepath;
+               // When we can't probe the server, we use some ugly function that does some pattern matching
+               return PortableContact::detectServer($url);
        }
 
        /**