]> git.mxchange.org Git - friendica.git/commitdiff
Bugfix: Postings disappeared due to a small variable ...
authorMichael Vogel <icarus@dabo.de>
Mon, 5 Jan 2015 13:28:17 +0000 (14:28 +0100)
committerMichael Vogel <icarus@dabo.de>
Mon, 5 Jan 2015 13:28:17 +0000 (14:28 +0100)
include/items.php
mod/parse_url.php

index b82b5dc9717773d77c7a043ff2a1ae7c6dce40f7..9d1e36f39b124f400d4c559c692661984c9f0f9a 100644 (file)
@@ -1348,7 +1348,7 @@ function item_store($arr,$force_parent = false, $notify = false, $dontcache = fa
                // Only do this for public postings to avoid privacy problems, since poco data is public.
                // Don't set this value if it isn't from the owner (could be an author that we don't know)
                if (!$arr['private'] AND (($arr["author-link"] === $arr["owner-link"]) OR ($arr["parent-uri"] === $arr["uri"])))
-                       $r = q("UPDATE `contact` SET `success_update` = '%s' WHERE `id` = %d",
+                       q("UPDATE `contact` SET `success_update` = '%s' WHERE `id` = %d",
                                dbesc($arr['received']),
                                intval($arr['contact-id'])
                        );
index 9df35c76125c652e8bfa9f34b6ca8f85da93a590..9f7b31be302b05576ea6111db14755f6ff32eeeb 100644 (file)
@@ -93,6 +93,15 @@ function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $co
                return($siteinfo);
        }
 
+       if ($do_oembed) {
+               require_once("include/oembed.php");
+
+               $oembed_data = oembed_fetch_url($url);
+
+               if ($oembed_data->type != "error")
+                       $siteinfo["type"] = $oembed_data->type;
+       }
+
        // if the file is too large then exit
        if ($curl_info["download_content_length"] > 1000000)
                return($siteinfo);
@@ -115,15 +124,6 @@ function parseurl_getsiteinfo($url, $no_guessing = false, $do_oembed = true, $co
         $http_code = $curl_info['http_code'];
        curl_close($ch);
 
-       if ($do_oembed) {
-               require_once("include/oembed.php");
-
-               $oembed_data = oembed_fetch_url($url);
-
-               if ($oembed_data->type != "error")
-                       $siteinfo["type"] = $oembed_data->type;
-       }
-
        // Fetch the first mentioned charset. Can be in body or header
        $charset = "";
        if (preg_match('/charset=(.*?)['."'".'"\s\n]/', $header, $matches))