]> git.mxchange.org Git - friendica.git/blobdiff - include/identity.php
New dba functions
[friendica.git] / include / identity.php
index 03a5416452634c6ec548502d34f88560c78e696a..d5233a91cb2907509a1ddc1c4f9d0c9f6931b205 100644 (file)
@@ -245,9 +245,8 @@ function profile_sidebar($profile, $block = 0) {
                        $profile_url = normalise_link(App::get_baseurl()."/profile/".$profile["nickname"]);
                }
 
-               $r = q("SELECT * FROM `contact` WHERE NOT `pending` AND `uid` = %d AND `nurl` = '%s'",
-                       local_user(), $profile_url);
-
+               $r = dba::select('contact', array('id'),
+                       array('pending' => false, 'uid' => local_user(), 'nurl' => $profile_url), array('limit' => 1));
                if (dbm::is_result($r))
                        $connect = false;
        }