X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fmessage.php;h=e49647b6ef7c9868fe162a28a31298a6e180711c;hb=a817a1a070b4530eaeb07c90608e289e451c755b;hp=c2678d2f1d4db92c8bc068512e0e1caae5498ce6;hpb=cd1724eb9ef4e07ced4c9019dd7bad55dc21abce;p=friendica.git diff --git a/include/message.php b/include/message.php index c2678d2f1d..e49647b6ef 100644 --- a/include/message.php +++ b/include/message.php @@ -5,6 +5,7 @@ use Friendica\App; use Friendica\Core\System; use Friendica\Core\Worker; +use Friendica\Database\DBM; function send_message($recipient=0, $body='', $subject='', $replyto=''){ @@ -42,7 +43,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){ dbesc($replyto), dbesc($replyto) ); - if (dbm::is_result($r)) + if (DBM::is_result($r)) $convid = $r[0]['convid']; } @@ -67,7 +68,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){ $r = dba::insert('conv', $fields); $r = dba::select('conv', array('id'), array('guid' => $conv_guid, 'uid' => local_user()), array('limit' => 1)); - if (dbm::is_result($r)) + if (DBM::is_result($r)) $convid = $r['id']; } @@ -106,7 +107,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){ dbesc($uri), intval(local_user()) ); - if (dbm::is_result($r)) + if (DBM::is_result($r)) $post_id = $r[0]['id']; /** @@ -144,7 +145,7 @@ function send_message($recipient=0, $body='', $subject='', $replyto=''){ } if ($post_id) { - Worker::add(PRIORITY_HIGH, "notifier", "mail", $post_id); + Worker::add(PRIORITY_HIGH, "Notifier", "mail", $post_id); return intval($post_id); } else { return -3; @@ -168,8 +169,6 @@ function send_wallmessage($recipient='', $body='', $subject='', $replyto=''){ $convid = 0; $reply = false; - require_once 'include/probe.php'; - $me = Probe::uri($replyto); if (! $me['name']) { @@ -193,7 +192,7 @@ function send_wallmessage($recipient='', $body='', $subject='', $replyto=''){ $r = dba::insert('conv', $fields); $r = dba::select('conv', array('id'), array('guid' => $conv_guid, 'uid' => $recipient['uid']), array('limit' => 1)); - if (!dbm::is_result($r)) { + if (!DBM::is_result($r)) { logger('send message: conversation not found.'); return -4; }