use Friendica\Util\Proxy as ProxyUtils;
use Friendica\Util\Strings;
-require_once 'include/dba.php';
-
/**
* Handles all OEmbed content fetching and replacement
*
{
$embedurl = trim($embedurl, '\'"');
- $a = get_app();
+ $a = \get_app();
$cache_key = 'oembed:' . $a->videowidth . ':' . $embedurl;
}
$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;
}
throw new Exception('OEmbed failed for URL: ' . $url);
}
- if (x($title)) {
+ if (!empty($title)) {
$o->title = $title;
}
*/
private static function iframe($src, $width, $height)
{
- $a = get_app();
+ $a = \get_app();
if (!$height || strstr($height, '%')) {
$height = '200';