X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ffcontact.php;h=b2706e51a0226e3cc13bfd6cafb4179a8c249fd6;hb=b81a1fde09a5186153ad7d5f8b71a576417f4547;hp=8821a985f2dc06e77619ce6bf7719c422358b031;hpb=8aa25523721303b6883e1a793f20997f8a33ec0a;p=friendica.git diff --git a/include/fcontact.php b/include/fcontact.php old mode 100755 new mode 100644 index 8821a985f2..b2706e51a0 --- a/include/fcontact.php +++ b/include/fcontact.php @@ -10,7 +10,7 @@ function fcontact_store($url,$name,$photo) { dbesc($nurl) ); - if(count($r)) + if (dbm::is_result($r)) return $r[0]['id']; $r = q("INSERT INTO `fcontact` ( `url`, `name`, `photo` ) VALUES ( '%s', '%s', '%s' ) ", @@ -19,11 +19,11 @@ function fcontact_store($url,$name,$photo) { dbesc($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']; }