parse_url: Problem when resizing images

This commit is contained in:
Michael Vogel 2012-07-14 13:59:42 +02:00
parent bfca7f47ef
commit 72f430ae58
2 changed files with 6 additions and 6 deletions

View File

@ -791,10 +791,10 @@ function get_atom_elements($feed,$item) {
call_hooks('parse_atom', $arr); call_hooks('parse_atom', $arr);
//if (($res["title"] != "") or (strpos($res["body"], "RT @") > 0)) { //if (($res["title"] != "") or (strpos($res["body"], "RT @") > 0)) {
if (strpos($res["body"], "RT @") !== false) { //if (strpos($res["body"], "RT @") !== false) {
$debugfile = tempnam("/home/ike/log", "item-res2-"); // $debugfile = tempnam("/home/ike/log", "item-res2-");
file_put_contents($debugfile, serialize($arr)); // file_put_contents($debugfile, serialize($arr));
} //}
return $res; return $res;
} }

View File

@ -147,11 +147,11 @@ function parseurl_getsiteinfo($url) {
if (($photodata[0] > 150) and ($photodata[1] > 150)) { if (($photodata[0] > 150) and ($photodata[1] > 150)) {
if ($photodata[0] > 300) { if ($photodata[0] > 300) {
$photodata[1] = $photodata[1] * (300 / $photodata[0]); $photodata[1] = round($photodata[1] * (300 / $photodata[0]));
$photodata[0] = 300; $photodata[0] = 300;
} }
if ($photodata[1] > 300) { if ($photodata[1] > 300) {
$photodata[0] = $photodata[0] * (300 / $photodata[1]); $photodata[0] = round($photodata[0] * (300 / $photodata[1]));
$photodata[1] = 300; $photodata[1] = 300;
} }
$siteinfo["images"][] = array("src"=>$src, $siteinfo["images"][] = array("src"=>$src,