X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ffcontact.php;h=7e93d067f38537b4362b6d6f9b53d5c0d45f7de1;hb=f3c8af485f67eda7cefb602793b94aebc17ffeb1;hp=8821a985f2dc06e77619ce6bf7719c422358b031;hpb=c3139fa0fd49b0b4de4568d46a6946c75ccb2a62;p=friendica.git diff --git a/include/fcontact.php b/include/fcontact.php index 8821a985f2..7e93d067f3 100644 --- a/include/fcontact.php +++ b/include/fcontact.php @@ -1,6 +1,6 @@ $nurl, 'name' => $name, 'photo' => $photo)); - if($r) { + if (DBM::is_result($r)) { $r = q("SELECT `id` FROM `fcontact` WHERE `url` = '%s' LIMIT 1", dbesc($nurl) ); - if(count($r)) + if (DBM::is_result($r)) return $r[0]['id']; } @@ -31,11 +27,7 @@ function fcontact_store($url,$name,$photo) { } function ffinder_store($uid,$cid,$fid) { - $r = q("INSERT INTO `ffinder` ( `uid`, `cid`, `fid` ) VALUES ( %d, %d, %d ) ", - intval($uid), - intval($cid), - intval($fid) - ); + $r = dba::insert('ffinder', array('uid' => $uid, 'cid' => $cid, 'fid' => $fid)); return $r; }