X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fparse_url.php;h=a1ca5a3db5e2e1c831d35bada4b52a3502b54183;hb=dc2e7a66b3cf9401afbc4cf425fc5a37c66d2d74;hp=1ca5dc1dacfe60cac9646b6adc913a6a565b26a5;hpb=268467fe042e412eb0054da1394200b1319c8193;p=friendica.git diff --git a/mod/parse_url.php b/mod/parse_url.php index 1ca5dc1dac..a1ca5a3db5 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -80,6 +80,7 @@ function parseurl_getsiteinfo_cached($url, $no_guessing = false, $do_oembed = tr function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $count = 1) { require_once("include/network.php"); + require_once("include/Photo.php"); $a = get_app(); @@ -330,7 +331,7 @@ function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $co $attr[$attribute->name] = $attribute->value; $src = completeurl($attr["src"], $url); - $photodata = @getimagesize($src); + $photodata = get_photo_info($src); if (($photodata) && ($photodata[0] > 150) and ($photodata[1] > 150)) { if ($photodata[0] > 300) { @@ -347,12 +348,12 @@ function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $co } } - } else { + } elseif ($siteinfo["image"] != "") { $src = completeurl($siteinfo["image"], $url); unset($siteinfo["image"]); - $photodata = @getimagesize($src); + $photodata = get_photo_info($src); if (($photodata) && ($photodata[0] > 10) and ($photodata[1] > 10)) $siteinfo["images"][] = array("src"=>$src,