]> git.mxchange.org Git - friendica.git/blobdiff - include/fcontact.php
huh? missed again
[friendica.git] / include / fcontact.php
old mode 100755 (executable)
new mode 100644 (file)
index 8821a98..b2706e5
@@ -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'];
        }