X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fparse_url.php;h=07f319fdca69e8ab2372b29b1302a81d1c97398c;hb=3fc5c1ad840f98926319478a855dab3686a0ace3;hp=f35c584feb3bf66a623c72efb4d7fae4ae9596dc;hpb=7ee8bdafc53a88fe51f233e14169bb4af0d376ab;p=friendica.git diff --git a/mod/parse_url.php b/mod/parse_url.php index f35c584feb..07f319fdca 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -11,6 +11,7 @@ */ use Friendica\App; use Friendica\Core\Addon; +use Friendica\Core\Logger; use Friendica\Util\Network; use Friendica\Util\ParseUrl; @@ -46,15 +47,15 @@ function parse_url_content(App $a) // Add url scheme if it is missing $arrurl = parse_url($url); - if (!x($arrurl, 'scheme')) { - if (x($arrurl, 'host')) { + if (empty($arrurl['scheme'])) { + if (!empty($arrurl['host'])) { $url = 'http:' . $url; } else { $url = 'http://' . $url; } } - logger($url); + Logger::log($url); // Check if the URL is an image, video or audio file. If so format // the URL with the corresponding BBCode media tag @@ -114,7 +115,7 @@ function parse_url_content(App $a) $result = sprintf($template, $url, ($title) ? $title : $url, $text) . $str_tags; - logger('(unparsed): returns: ' . $result); + Logger::log('(unparsed): returns: ' . $result); echo $result; exit();