]> git.mxchange.org Git - friendica.git/commitdiff
Some manual revert ...
authorMichael Vogel <icarus@dabo.de>
Mon, 20 Jun 2016 20:48:09 +0000 (22:48 +0200)
committerMichael Vogel <icarus@dabo.de>
Mon, 20 Jun 2016 20:48:09 +0000 (22:48 +0200)
include/diaspora.php

index 84aed81471f1b63a2b56e38fbc54d7bacc65c9cf..2ff7a90cfbe677cc4eb92a880a4fb7be39bfb09d 100644 (file)
@@ -981,23 +981,6 @@ class diaspora {
                return true;
        }
 
-       /**
-        * @brief Fetch the uri from our database if we already have this item (maybe from ourselves)
-        *
-        * @param string $author Author handle
-        * @param string $guid Message guid
-        *
-        * @return string The constructed uri or the one from our database
-        */
-       private function get_uri_from_guid($author, $guid) {
-
-               $r = q("SELECT `uri` FROM `item` WHERE `guid` = '%s' LIMIT 1", dbesc($guid));
-               if ($r)
-                       return $r[0]["uri"];
-               else
-                       return $author.":".$guid;
-       }
-
        /**
         * @brief Processes an incoming comment
         *
@@ -1050,7 +1033,7 @@ class diaspora {
                $datarray["owner-avatar"] = ((x($contact,"thumb")) ? $contact["thumb"] : $contact["photo"]);
 
                $datarray["guid"] = $guid;
-               $datarray["uri"] = self::get_uri_from_guid($author, $guid);
+               $datarray["uri"] = $author.":".$guid;
 
                $datarray["type"] = "remote-comment";
                $datarray["verb"] = ACTIVITY_POST;
@@ -1387,7 +1370,7 @@ class diaspora {
                $datarray["owner-avatar"] = ((x($contact,"thumb")) ? $contact["thumb"] : $contact["photo"]);
 
                $datarray["guid"] = $guid;
-               $datarray["uri"] = self::get_uri_from_guid($author, $guid);
+               $datarray["uri"] = $author.":".$guid;
 
                $datarray["type"] = "activity";
                $datarray["verb"] = $verb;
@@ -1986,7 +1969,7 @@ class diaspora {
                $datarray["owner-avatar"] = $datarray["author-avatar"];
 
                $datarray["guid"] = $guid;
-               $datarray["uri"] = $datarray["parent-uri"] = self::get_uri_from_guid($author, $guid);
+               $datarray["uri"] = $datarray["parent-uri"] = $author.":".$guid;
 
                $datarray["verb"] = ACTIVITY_POST;
                $datarray["gravity"] = GRAVITY_PARENT;
@@ -2188,7 +2171,7 @@ class diaspora {
                $datarray["owner-avatar"] = $datarray["author-avatar"];
 
                $datarray["guid"] = $guid;
-               $datarray["uri"] = $datarray["parent-uri"] = self::get_uri_from_guid($author, $guid);
+               $datarray["uri"] = $datarray["parent-uri"] = $author.":".$guid;
 
                $datarray["verb"] = ACTIVITY_POST;
                $datarray["gravity"] = GRAVITY_PARENT;