]> git.mxchange.org Git - friendica.git/blobdiff - include/diaspora.php
Merge branch 'develop' into rewrites/dbm_is_result
[friendica.git] / include / diaspora.php
index f2d48486788bf68145cd3dcbb22b07395b4d91f5..3b4832e74f579bcdd35b4cba9f2ba1f4e22fec8a 100644 (file)
@@ -1278,7 +1278,7 @@ class diaspora {
                $r = q("SELECT `id` FROM `mail` WHERE `uri` = '%s' LIMIT 1",
                        dbesc($message_uri)
                );
-               if($r) {
+               if (dbm::is_result($r)) {
                        logger("duplicate message already delivered.", LOGGER_DEBUG);
                        return false;
                }
@@ -2290,7 +2290,7 @@ class diaspora {
                                $body = "[img]".unxmlify($photo->remote_photo_path).
                                        unxmlify($photo->remote_photo_name)."[/img]\n".$body;
 
-                       $datarray["object-type"] = ACTIVITY_OBJ_PHOTO;
+                       $datarray["object-type"] = ACTIVITY_OBJ_IMAGE;
                } else {
                        $datarray["object-type"] = ACTIVITY_OBJ_NOTE;
 
@@ -2925,7 +2925,7 @@ class diaspora {
 
                $p = q("SELECT `guid`, `uri`, `parent-uri` FROM `item` WHERE `uri` = '%s' LIMIT 1",
                        dbesc($item["thr-parent"]));
-               if(!$p)
+               if (!dbm::is_result($p))
                        return false;
 
                $parent = $p[0];
@@ -2956,7 +2956,7 @@ class diaspora {
                        intval($item["parent"])
                );
 
-               if (!$p)
+               if (!dbm::is_result($p))
                        return false;
 
                $parent = $p[0];
@@ -3170,7 +3170,7 @@ class diaspora {
                        intval($item["uid"])
                );
 
-               if (!$r) {
+               if (!dbm::is_result($r)) {
                        logger("conversation not found.");
                        return;
                }