]> git.mxchange.org Git - friendica.git/blobdiff - include/plaintext.php
Small text correction
[friendica.git] / include / plaintext.php
index e18604334b2041f3c0b5fe6f62f28978ae66fd2f..793f9935a74ba061ce1b5b5ba4c8af7e90838dbf 100644 (file)
@@ -189,6 +189,13 @@ function get_attached_data($body) {
                        if (count($pictures) == 1) {
                                // Checking, if the link goes to a picture
                                $data = parseurl_getsiteinfo_cached($pictures[0][1], true);
+
+                               // Workaround:
+                               // Sometimes photo posts to the own album are not detected at the start.
+                               // So we seem to cannot use the cache for these cases. That's strange.
+                               if (($data["type"] != "photo") AND strstr($pictures[0][1], "/photos/"))
+                                       $data = parseurl_getsiteinfo($pictures[0][1], true);
+
                                if ($data["type"] == "photo") {
                                        $post["type"] = "photo";
                                        if (isset($data["images"][0])) {