From 4e6e09a44f59bc9b11b4de47dd5bea2601ab0355 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Tue, 15 Jul 2014 08:48:40 +0200 Subject: [PATCH] The function "get_attached_data" hasn't always detected photos --- include/plaintext.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/plaintext.php b/include/plaintext.php index 4bbca636c..eb33d16e9 100644 --- a/include/plaintext.php +++ b/include/plaintext.php @@ -53,7 +53,6 @@ function get_attached_data($body) { if (count($pictures) == 1) { // Checking, if the link goes to a picture $data = parseurl_getsiteinfo($pictures[0][1], true); - if ($data["type"] == "photo") { $post["type"] = "photo"; if (isset($data["images"][0])) @@ -64,8 +63,7 @@ function get_attached_data($body) { $post["preview"] = $pictures[0][2]; $post["text"] = str_replace($pictures[0][0], "", $body); } else { - $img_str = fetch_url($pictures[0][1]); - $imgdata = get_photo_info($img_str); + $imgdata = get_photo_info($pictures[0][1]); if (substr($imgdata["mime"], 0, 6) == "image/") { $post["type"] = "photo"; $post["image"] = $pictures[0][1];