]> git.mxchange.org Git - friendica.git/commitdiff
parse_url: Fixed a problem in the detection if there was an image or not. Additionall...
authorMichael Vogel <icarus@dabo.de>
Thu, 2 Aug 2012 08:25:08 +0000 (10:25 +0200)
committerMichael Vogel <icarus@dabo.de>
Thu, 2 Aug 2012 08:25:08 +0000 (10:25 +0200)
mod/parse_url.php

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