Improved detection for a local contact
This commit is contained in:
parent
424a85bb94
commit
aa6313dee6
3 changed files with 24 additions and 3 deletions
|
@ -453,6 +453,13 @@ class Contact
|
|||
*/
|
||||
public static function isLocal($url)
|
||||
{
|
||||
if (!parse_url($url, PHP_URL_SCHEME)) {
|
||||
$addr_parts = explode('@', $url);
|
||||
if (count($addr_parts) == 2) {
|
||||
return $addr_parts[1] == DI::baseUrl()->getHostname();
|
||||
}
|
||||
}
|
||||
|
||||
return Strings::compareLink(self::getBasepath($url, true), DI::baseUrl());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue