Weird stuff

This commit is contained in:
Michael 2018-06-02 13:00:47 +00:00
parent 81c002370e
commit c6c94b8cea

View file

@ -1699,7 +1699,7 @@ class Contact extends BaseObject
{
$cid = self::getIdForURL($contact_url, 0, true);
if (empty($cid)) {
return ($url != '') ? $url : $contact_url;
return $url ?: $contact_url; // Equivalent to: ($url != '') ? $url : $contact_url;
}
return self::magicLinkbyId($cid, $url);
@ -1718,7 +1718,7 @@ class Contact extends BaseObject
$contact = dba::selectFirst('contact', ['network', 'url', 'uid'], ['id' => $cid]);
if ($contact['network'] != NETWORK_DFRN) {
return ($url != '') ? $url : $contact['url'];
return $url ?: $contact['url']; // Equivalent to ($url != '') ? $url : $contact['url'];
}
// Only redirections to the same host do make sense