X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fwallmessage.php;h=1ac54c9f8a035e01e7b72cea3355b9ca3cad223d;hb=c54a2c1e83822f6e043b449468570d2c9ed3ab3a;hp=a01dfd2b9f7fde6f4f518899456be6fe4b8fb10b;hpb=0c67c89715df801e0c887be50c9739db3bae7ca3;p=friendica.git diff --git a/mod/wallmessage.php b/mod/wallmessage.php index a01dfd2b9f..1ac54c9f8a 100644 --- a/mod/wallmessage.php +++ b/mod/wallmessage.php @@ -1,9 +1,12 @@ get_baseurl() . '/profile/' . $user['nickname']); -} + goaway('profile/'.$user['nickname']); + } -if(! function_exists('wallmessage_content')) { -function wallmessage_content(&$a) { + +function wallmessage_content(App $a) { if(! get_my_url()) { notice( t('Permission denied.') . EOL); @@ -92,7 +89,7 @@ function wallmessage_content(&$a) { dbesc($recipient) ); - if(! count($r)) { + if (! DBM::is_result($r)) { notice( t('No recipient.') . EOL); logger('wallmessage: no recipient'); return; @@ -114,30 +111,20 @@ function wallmessage_content(&$a) { return; } - - - $editselect = 'none'; - if( feature_enabled(local_user(), 'richtext') ) - $editselect = '/(profile-jot-text|prvmail-text)/'; - $tpl = get_markup_template('wallmsg-header.tpl'); $a->page['htmlhead'] .= replace_macros($tpl, array( - '$baseurl' => $a->get_baseurl(true), - '$editselect' => $editselect, + '$baseurl' => System::baseUrl(true), '$nickname' => $user['nickname'], '$linkurl' => t('Please enter a link URL:') )); $tpl = get_markup_template('wallmsg-end.tpl'); $a->page['end'] .= replace_macros($tpl, array( - '$baseurl' => $a->get_baseurl(true), - '$editselect' => $editselect, + '$baseurl' => System::baseUrl(true), '$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'), @@ -159,4 +146,3 @@ function wallmessage_content(&$a) { return $o; } -}