X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FOEmbed.php;h=dd6ac7caa23109834e2959bb0035a680a755c9ce;hb=8c2efa6df43c3895eb571869621fb7687bdfc404;hp=a1fe4f30649b107e118ab8c87b09fa781863f0c2;hpb=5a8654194af6edcb74c86606821c5ee75392ab12;p=friendica.git diff --git a/src/Content/OEmbed.php b/src/Content/OEmbed.php index a1fe4f3064..dd6ac7caa2 100644 --- a/src/Content/OEmbed.php +++ b/src/Content/OEmbed.php @@ -19,9 +19,9 @@ use Friendica\Database\DBA; use Friendica\Util\DateTimeFormat; use Friendica\Util\Network; use Friendica\Util\ParseUrl; +use Friendica\Util\Proxy as ProxyUtils; require_once 'include/dba.php'; -require_once 'mod/proxy.php'; /** * Handles all OEmbed content fetching and replacement @@ -152,7 +152,7 @@ class OEmbed $oembed->description = $data['text']; } - if (is_array($data['images'])) { + if (!empty($data['images'])) { $oembed->thumbnail_url = $data['images'][0]['src']; $oembed->thumbnail_width = $data['images'][0]['width']; $oembed->thumbnail_height = $data['images'][0]['height']; @@ -191,13 +191,16 @@ class OEmbed $ret = $oembed->html; } break; + case "photo": - $ret .= ''; + $ret .= ''; break; + case "link": break; + case "rich": - $ret .= proxy_parse_html($oembed->html); + $ret .= ProxyUtils::proxifyHtml($oembed->html); break; }