From: Hypolite Petovan Date: Sat, 6 Jun 2020 21:31:23 +0000 (-0400) Subject: Remove superfluous code X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=eaa7740da606872f57765f1744b32c6e1f1d28a9;p=friendica.git Remove superfluous code - Remove explicit default parameter value in BBCode::convertShareCallback - Remove Probe::$baseurl reset since the twitter probe sets the `baseurl` property - Remove baseurl guessing in Probe::detect --- diff --git a/src/Content/Text/BBCode.php b/src/Content/Text/BBCode.php index ae1af435c6..70c7eb92a9 100644 --- a/src/Content/Text/BBCode.php +++ b/src/Content/Text/BBCode.php @@ -1076,7 +1076,7 @@ class BBCode default: $text = ($is_quote_share? "\n" : ''); - $authorId = Contact::getIdForURL($attributes['profile'], 0); + $authorId = Contact::getIdForURL($attributes['profile']); $contact = Contact::getById($authorId, ['network']); diff --git a/src/Network/Probe.php b/src/Network/Probe.php index 241988dd53..19fc135d7b 100644 --- a/src/Network/Probe.php +++ b/src/Network/Probe.php @@ -781,13 +781,6 @@ class Probe Logger::log($uri." is ".$result["network"], Logger::DEBUG); - if (empty($result["baseurl"]) && ($result["network"] != Protocol::PHANTOM)) { - $pos = strpos($result["url"], $host); - if ($pos) { - $result["baseurl"] = substr($result["url"], 0, $pos).$host; - } - } - return $result; } @@ -1730,8 +1723,6 @@ class Probe */ private static function twitter($uri) { - self::$baseurl = ''; - if (preg_match('=(.*)@twitter.com=i', $uri, $matches)) { $nick = $matches[1]; } elseif (preg_match('=https?://twitter.com/(.*)=i', $uri, $matches)) {