parse_url: Fixed a problem in the detection if there was an image or not. Additionally removed some test content.

This commit is contained in:
Michael Vogel 2012-08-02 10:25:08 +02:00
parent 2aa67d67f5
commit 6d0f0e6273
1 changed files with 5 additions and 3 deletions

View File

@ -176,6 +176,9 @@ function parseurl_getsiteinfo($url) {
} }
} else { } else {
$src = completeurl($siteinfo["image"], $url); $src = completeurl($siteinfo["image"], $url);
unset($siteinfo["image"]);
$photodata = getimagesize($src); $photodata = getimagesize($src);
if (($photodata[0] > 10) and ($photodata[1] > 10)) if (($photodata[0] > 10) and ($photodata[1] > 10))
@ -292,8 +295,7 @@ function parse_url_content(&$a) {
$siteinfo = parseurl_getsiteinfo($url); $siteinfo = parseurl_getsiteinfo($url);
if($siteinfo["title"] == "") { if($siteinfo["title"] == "") {
echo print_r($siteinfo, true); echo sprintf($template,$url,$url,'') . $str_tags;
//echo sprintf($template,$url,$url,'') . $str_tags;
killme(); killme();
} else { } else {
$text = $siteinfo["text"]; $text = $siteinfo["text"];
@ -302,7 +304,7 @@ function parse_url_content(&$a) {
$image = ""; $image = "";
if($siteinfo["image"] != ""){ if(sizeof($siteinfo["images"]) > 0){
/* /*
Execute below code only if image is present in siteinfo Execute below code only if image is present in siteinfo
*/ */