]> git.mxchange.org Git - friendica.git/blobdiff - include/threads.php
More usage of dbm::is_result($r) instead of count($r):
[friendica.git] / include / threads.php
index df0f8ee1de5a24e5577be553a4871226573c312d..97904cadd85fce9c927d830d60d9191956ba45c8 100644 (file)
@@ -142,12 +142,12 @@ function add_shadow_entry($itemid) {
 
        // Is there a shadow parent?
        $r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' AND `uid` = 0 LIMIT 1", dbesc($item['parent-uri']));
-       if (!count($r))
+       if (!dbm::is_result($r))
                return;
 
        // Is there already a shadow entry?
        $r = q("SELECT `id` FROM `item` WHERE `uri` = '%s' AND `uid` = 0 LIMIT 1", dbesc($item['uri']));
-       if (count($r))
+       if (dbm::is_result($r))
                return;
 
        // Preparing public shadow (removing user specific data)
@@ -241,7 +241,7 @@ function delete_thread($itemid, $itemuri = "") {
                                dbesc($itemuri),
                                intval($item["uid"])
                        );
-               if (!count($r)) {
+               if (!dbm::is_result($r)) {
                        $r = q("DELETE FROM `item` WHERE `uri` = '%s' AND `uid` = 0",
                                dbesc($itemuri)
                        );