X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FContent%2FOEmbed.php;h=6aa76a55ac124af15540286e26b2a7be1b0efe67;hb=795268eb7ad3f10b08721f5d006f22a91bb5c9b6;hp=c37e36f6073c05d5560c4b1b1c44286deedffed7;hpb=2ef23300a33440aa4bfee4353572ac6960481ee8;p=friendica.git diff --git a/src/Content/OEmbed.php b/src/Content/OEmbed.php index c37e36f607..6aa76a55ac 100644 --- a/src/Content/OEmbed.php +++ b/src/Content/OEmbed.php @@ -23,8 +23,6 @@ use Friendica\Util\ParseUrl; use Friendica\Util\Proxy as ProxyUtils; use Friendica\Util\Strings; -require_once 'include/dba.php'; - /** * Handles all OEmbed content fetching and replacement * @@ -58,7 +56,7 @@ class OEmbed { $embedurl = trim($embedurl, '\'"'); - $a = get_app(); + $a = \get_app(); $cache_key = 'oembed:' . $a->videowidth . ':' . $embedurl; @@ -308,12 +306,12 @@ class OEmbed } $domain = parse_url($url, PHP_URL_HOST); - if (!x($domain)) { + if (empty($domain)) { return false; } $str_allowed = Config::get('system', 'allowed_oembed', ''); - if (!x($str_allowed)) { + if (empty($str_allowed)) { return false; } @@ -334,7 +332,7 @@ class OEmbed throw new Exception('OEmbed failed for URL: ' . $url); } - if (x($title)) { + if (!empty($title)) { $o->title = $title; } @@ -366,7 +364,7 @@ class OEmbed */ private static function iframe($src, $width, $height) { - $a = get_app(); + $a = \get_app(); if (!$height || strstr($height, '%')) { $height = '200';