]> git.mxchange.org Git - friendica.git/blobdiff - mod/notes.php
More usage of dbm::is_result($r) instead of count($r):
[friendica.git] / mod / notes.php
index a25d090ed701faad32ab49fb2dbc7012b13d8e2f..f1b49ebee42d0e6dbedc227d6b9694f6f2d621f4 100644 (file)
@@ -82,7 +82,7 @@ function notes_content(&$a,$update = false) {
 
        );
 
-       if(count($r)) {
+       if(dbm::is_result($r)) {
                $a->set_pager_total($r[0]['total']);
                $a->set_pager_itemspage(40);
        }
@@ -102,7 +102,7 @@ function notes_content(&$a,$update = false) {
        $parents_arr = array();
        $parents_str = '';
 
-       if(count($r)) {
+       if(dbm::is_result($r)) {
                foreach($r as $rr)
                        $parents_arr[] = $rr['item_id'];
                $parents_str = implode(', ', $parents_arr);
@@ -116,7 +116,7 @@ function notes_content(&$a,$update = false) {
                        dbesc($parents_str)
                );
 
-               if(count($r)) {
+               if(dbm::is_result($r)) {
                        $items = conv_sort($r,"`commented`");
 
                        $o .= conversation($a,$items,'notes',$update);