require_once('include/message.php');
-function wallmessage_post(&$a) {
+function wallmessage_post(App $a) {
$replyto = get_my_url();
if(! $replyto) {
dbesc($recipient)
);
- if(! count($r)) {
+ if (! dbm::is_result($r)) {
logger('wallmessage: no recipient');
return;
}
$body = str_replace("\r\n","\n",$body);
$body = str_replace("\n\n","\n",$body);
-
+
$ret = send_wallmessage($user, $body, $subject, $replyto);
switch($ret){
info( t('Message sent.') . EOL );
}
-// goaway($a->get_baseurl() . '/profile/' . $user['nickname']);
-
+ goaway('profile/'.$user['nickname']);
+
}
-function wallmessage_content(&$a) {
+function wallmessage_content(App $a) {
if(! get_my_url()) {
notice( t('Permission denied.') . EOL);
dbesc($recipient)
);
- if(! count($r)) {
+ if (! dbm::is_result($r)) {
notice( t('No recipient.') . EOL);
logger('wallmessage: no recipient');
return;
'$nickname' => $user['nickname'],
'$linkurl' => t('Please enter a link URL:')
));
-
-
+
+
$tpl = get_markup_template('wallmessage.tpl');
$o .= replace_macros($tpl,array(
'$header' => t('Send Private Message'),