]> git.mxchange.org Git - friendica.git/blobdiff - include/threads.php
Merge branch 'rewrites/dbm_is_result' of github.com:Quix0r/friendica into rewrites...
[friendica.git] / include / threads.php
index 97904cadd85fce9c927d830d60d9191956ba45c8..2eb05a8a360da0ff46b54a4471b0dc0cae178968 100644 (file)
@@ -174,7 +174,7 @@ function add_shadow_entry($itemid) {
 function update_thread_uri($itemuri, $uid) {
        $messages = q("SELECT `id` FROM `item` WHERE uri ='%s' AND uid=%d", dbesc($itemuri), intval($uid));
 
-       if(count($messages))
+       if(dbm::is_result($messages))
                foreach ($messages as $message)
                        update_thread($message["id"]);
 }
@@ -183,7 +183,7 @@ function update_thread($itemid, $setmention = false) {
        $items = q("SELECT `uid`, `guid`, `title`, `body`, `created`, `edited`, `commented`, `received`, `changed`, `wall`, `private`, `pubmail`, `moderated`, `visible`, `spam`, `starred`, `bookmark`, `contact-id`, `gcontact-id`,
                        `deleted`, `origin`, `forum_mode`, `network`, `rendered-html`, `rendered-hash` FROM `item` WHERE `id` = %d AND (`parent` = %d OR `parent` = 0) LIMIT 1", intval($itemid), intval($itemid));
 
-       if (!$items)
+       if (!dbm::is_result($items))
                return;
 
        $item = $items[0];