From 72f430ae58b830e499114241d340f39a228b867c Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Sat, 14 Jul 2012 13:59:42 +0200 Subject: [PATCH] parse_url: Problem when resizing images --- include/items.php | 8 ++++---- mod/parse_url.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/items.php b/include/items.php index b81208f36..724e0ac0f 100755 --- a/include/items.php +++ b/include/items.php @@ -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; } diff --git a/mod/parse_url.php b/mod/parse_url.php index 32f28b7b7..3d4018745 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -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,