Fallback to regular attachment display on oembed error
This commit is contained in:
parent
b01daf18c5
commit
77c1251d03
|
@ -131,14 +131,12 @@ class OEmbed
|
||||||
$j->embedurl = $embedurl;
|
$j->embedurl = $embedurl;
|
||||||
|
|
||||||
// If fetching information doesn't work, then improve via internal functions
|
// If fetching information doesn't work, then improve via internal functions
|
||||||
if (($j->type == "error") || ($no_rich_type && ($j->type == "rich"))) {
|
if ($no_rich_type && ($j->type == "rich")) {
|
||||||
$data = ParseUrl::getSiteinfoCached($embedurl, true, false);
|
$data = ParseUrl::getSiteinfoCached($embedurl, true, false);
|
||||||
$j->type = $data["type"];
|
$j->type = $data["type"];
|
||||||
|
|
||||||
if ($j->type == "photo") {
|
if ($j->type == "photo") {
|
||||||
$j->url = $data["url"];
|
$j->url = $data["url"];
|
||||||
//$j->width = $data["images"][0]["width"];
|
|
||||||
//$j->height = $data["images"][0]["height"];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($data["title"])) {
|
if (isset($data["title"])) {
|
||||||
|
|
Loading…
Reference in a new issue