]> git.mxchange.org Git - friendica.git/blobdiff - mod/wallmessage.php
added more curyl braces + spaces between "if" and brace
[friendica.git] / mod / wallmessage.php
index a01dfd2b9f7fde6f4f518899456be6fe4b8fb10b..afe25cbe8be9dfeb3fa0ac86c1023baa864f0e82 100644 (file)
@@ -2,7 +2,6 @@
 
 require_once('include/message.php');
 
-if(! function_exists('wallmessage_post')) {
 function wallmessage_post(&$a) {
 
        $replyto = get_my_url();
@@ -23,7 +22,7 @@ function wallmessage_post(&$a) {
                dbesc($recipient)
        );
 
-       if(! count($r)) {
+       if (! dbm::is_result($r)) {
                logger('wallmessage: no recipient');
                return;
        }
@@ -69,11 +68,11 @@ function wallmessage_post(&$a) {
                        info( t('Message sent.') . EOL );
        }
 
-//     goaway($a->get_baseurl() . '/profile/' . $user['nickname']);
-}
+       goaway('profile/'.$user['nickname']);
+
 }
 
-if(! function_exists('wallmessage_content')) {
+
 function wallmessage_content(&$a) {
 
        if(! get_my_url()) {
@@ -92,7 +91,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;
@@ -135,9 +134,9 @@ function wallmessage_content(&$a) {
                '$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 +158,3 @@ function wallmessage_content(&$a) {
 
        return $o;
 }
-}