X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fthreads.php;h=97904cadd85fce9c927d830d60d9191956ba45c8;hb=6a8a36f12d00f35004fbb034972ca87dd1a3c4f5;hp=df0f8ee1de5a24e5577be553a4871226573c312d;hpb=293436e5fd5110220c969513858dbb979f1f35d3;p=friendica.git diff --git a/include/threads.php b/include/threads.php index df0f8ee1de..97904cadd8 100644 --- a/include/threads.php +++ b/include/threads.php @@ -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) );