]> git.mxchange.org Git - friendica.git/commitdiff
Merge remote-tracking branch 'upstream/develop' into develop
authorRoland Häder <roland@mxchange.org>
Wed, 4 Jan 2017 08:03:00 +0000 (09:03 +0100)
committerRoland Häder <roland@mxchange.org>
Wed, 4 Jan 2017 08:03:00 +0000 (09:03 +0100)
1  2 
mod/item.php

diff --cc mod/item.php
index ee532bd99b53e8db0f5d0e75e7bf6df98df5f6b0,9e38382cc38d4af6d3f6184dcfae4e5a3ea1730e..1c7a970c2da2eda04026e624bbdc35494ab826ad
@@@ -139,18 -138,9 +138,9 @@@ function item_post(App &$a) 
  
                        // If the contact id doesn't fit with the contact, then set the contact to null
                        $thrparent = q("SELECT `author-link`, `network` FROM `item` WHERE `uri` = '%s' LIMIT 1", dbesc($thr_parent));
 -                      if (count($thrparent) AND ($thrparent[0]["network"] === NETWORK_OSTATUS)
 +                      if (dbm::is_result($thrparent) AND ($thrparent[0]["network"] === NETWORK_OSTATUS)
                                AND (normalise_link($parent_contact["url"]) != normalise_link($thrparent[0]["author-link"]))) {
-                               $parent_contact = null;
-                               $r = q("SELECT * FROM `gcontact` WHERE `nurl` = '%s' LIMIT 1",
-                                       dbesc(normalise_link($thrparent[0]["author-link"])));
-                               if (dbm::is_result($r)) {
-                                       $parent_contact = $r[0];
-                                       $parent_contact["thumb"] = $parent_contact["photo"];
-                                       $parent_contact["micro"] = $parent_contact["photo"];
-                                       unset($parent_contact["id"]);
-                               }
+                               $parent_contact = get_contact_details_by_url($thrparent[0]["author-link"]);
  
                                if (!isset($parent_contact["nick"])) {
                                        require_once("include/Scrape.php");