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
This commit is contained in:
parent
1de5f2eebb
commit
eaa7740da6
|
@ -1076,7 +1076,7 @@ class BBCode
|
||||||
default:
|
default:
|
||||||
$text = ($is_quote_share? "\n" : '');
|
$text = ($is_quote_share? "\n" : '');
|
||||||
|
|
||||||
$authorId = Contact::getIdForURL($attributes['profile'], 0);
|
$authorId = Contact::getIdForURL($attributes['profile']);
|
||||||
|
|
||||||
$contact = Contact::getById($authorId, ['network']);
|
$contact = Contact::getById($authorId, ['network']);
|
||||||
|
|
||||||
|
|
|
@ -781,13 +781,6 @@ class Probe
|
||||||
|
|
||||||
Logger::log($uri." is ".$result["network"], Logger::DEBUG);
|
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;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1730,8 +1723,6 @@ class Probe
|
||||||
*/
|
*/
|
||||||
private static function twitter($uri)
|
private static function twitter($uri)
|
||||||
{
|
{
|
||||||
self::$baseurl = '';
|
|
||||||
|
|
||||||
if (preg_match('=(.*)@twitter.com=i', $uri, $matches)) {
|
if (preg_match('=(.*)@twitter.com=i', $uri, $matches)) {
|
||||||
$nick = $matches[1];
|
$nick = $matches[1];
|
||||||
} elseif (preg_match('=https?://twitter.com/(.*)=i', $uri, $matches)) {
|
} elseif (preg_match('=https?://twitter.com/(.*)=i', $uri, $matches)) {
|
||||||
|
|
Loading…
Reference in a new issue