]> git.mxchange.org Git - friendica.git/commitdiff
Remove superfluous code
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 6 Jun 2020 21:31:23 +0000 (17:31 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 10 Jun 2020 14:15:54 +0000 (10:15 -0400)
- 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

src/Content/Text/BBCode.php
src/Network/Probe.php

index ae1af435c6b93ec139b5391a866e4fc5522369cc..70c7eb92a9d14343c6aa196f05392f49e9e10d12 100644 (file)
@@ -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']);
 
index 241988dd53efb5dbbc68fcc14912ce9883974043..19fc135d7b4b8f9fbe0ac3dd004be56983edaec9 100644 (file)
@@ -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)) {