]> git.mxchange.org Git - friendica.git/blobdiff - include/contact_widgets.php
More usage of dbm::is_result($r) instead of count($r):
[friendica.git] / include / contact_widgets.php
index bbbd941b5609df3ae7321bc708599e17c6de4ccc..e0a33eee08728fc7dbf7608fd7c30a8f4dd4862f 100644 (file)
@@ -93,7 +93,7 @@ function networks_widget($baseurl,$selected = '') {
        );
 
        $nets = array();
-       if(count($r)) {
+       if(dbm::is_result($r)) {
                require_once('include/contact_selectors.php');
                foreach($r as $rr) {
                                if($rr['network'])
@@ -204,13 +204,13 @@ function common_friends_visitor_widget($profile_uid) {
                                dbesc(normalise_link(get_my_url())),
                                intval($profile_uid)
                        );
-                       if(count($r))
+                       if(dbm::is_result($r))
                                $cid = $r[0]['id'];
                        else {
                                $r = q("select id from gcontact where nurl = '%s' limit 1",
                                        dbesc(normalise_link(get_my_url()))
                                );
-                               if(count($r))
+                               if(dbm::is_result($r))
                                        $zcid = $r[0]['id'];
                        }
                }