]> git.mxchange.org Git - friendica.git/blobdiff - include/message.php
More usage of dbm::is_result($r) instead of count($r):
[friendica.git] / include / message.php
index 0f4b53c626964a8122b1494032a000326f94990b..041110440450df8fdf0729b23075a32cc386253d 100644 (file)
@@ -41,7 +41,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){
                        dbesc($replyto),
                        dbesc($replyto)
                );
-               if(count($r))
+               if(dbm::is_result($r))
                        $convid = $r[0]['convid'];
        }
 
@@ -74,7 +74,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){
                        dbesc($conv_guid),
                        intval(local_user())
                );
-               if(count($r))
+               if(dbm::is_result($r))
                        $convid = $r[0]['id'];
        }
 
@@ -113,7 +113,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){
                dbesc($uri),
                intval(local_user())
        );
-       if(count($r))
+       if(dbm::is_result($r))
                $post_id = $r[0]['id'];
 
        /**
@@ -150,7 +150,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){
        }
 
        if($post_id) {
-               proc_run('php',"include/notifier.php","mail","$post_id");
+               proc_run(PRIORITY_HIGH, "include/notifier.php", "mail", $post_id);
                return intval($post_id);
        } else {
                return -3;
@@ -210,7 +210,7 @@ function send_wallmessage($recipient='', $body='', $subject='', $replyto=''){
                dbesc($conv_guid),
                intval($recipient['uid'])
        );
-       if(count($r))
+       if(dbm::is_result($r))
                $convid = $r[0]['id'];
 
        if(! $convid) {