]> git.mxchange.org Git - friendica.git/commitdiff
parse_url: Problem when resizing images
authorMichael Vogel <icarus@dabo.de>
Sat, 14 Jul 2012 11:59:42 +0000 (13:59 +0200)
committerMichael Vogel <icarus@dabo.de>
Sat, 14 Jul 2012 11:59:42 +0000 (13:59 +0200)
include/items.php
mod/parse_url.php

index b81208f3666bda612614011667979fb2fa119084..724e0ac0f565976aa8f033522fcea828f4d1359a 100755 (executable)
@@ -791,10 +791,10 @@ function get_atom_elements($feed,$item) {
        call_hooks('parse_atom', $arr);
 
        //if (($res["title"] != "") or (strpos($res["body"], "RT @") > 0)) {
-       if (strpos($res["body"], "RT @") !== false) {
-               $debugfile = tempnam("/home/ike/log", "item-res2-");
-               file_put_contents($debugfile, serialize($arr));
-       }
+       //if (strpos($res["body"], "RT @") !== false) {
+       //      $debugfile = tempnam("/home/ike/log", "item-res2-");
+       //      file_put_contents($debugfile, serialize($arr));
+       //}
 
        return $res;
 }
index 32f28b7b7bce3c6f67d6260e97e7f74147c6d1e1..3d4018745c6e580f355e909d23fc09101509ce9f 100644 (file)
@@ -147,11 +147,11 @@ function parseurl_getsiteinfo($url) {
 
                        if (($photodata[0] > 150) and ($photodata[1] > 150)) {
                                if ($photodata[0] > 300) {
-                                       $photodata[1] = $photodata[1] * (300 / $photodata[0]);
+                                       $photodata[1] = round($photodata[1] * (300 / $photodata[0]));
                                        $photodata[0] = 300;
                                }
                                if ($photodata[1] > 300) {
-                                       $photodata[0] = $photodata[0] * (300 / $photodata[1]);
+                                       $photodata[0] = round($photodata[0] * (300 / $photodata[1]));
                                        $photodata[1] = 300;
                                }
                                $siteinfo["images"][] = array("src"=>$src,