X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fnewmessage.php;h=447a00580cfe8cb17fab4f3a0173e5b8c3cab6b9;hb=6e894c010fc0e7ddaaafa8795634d6343019aafb;hp=0db2e7181ca7d327b37023e7143ae70cbb932b56;hpb=ec6a38a62786c85e8ee30c5726ea81f82465b39d;p=quix0rs-gnu-social.git diff --git a/actions/newmessage.php b/actions/newmessage.php index 0db2e7181c..447a00580c 100644 --- a/actions/newmessage.php +++ b/actions/newmessage.php @@ -144,11 +144,14 @@ class NewmessageAction extends Action $this->showForm(_('No content!')); return; } else { - $content_shortened = common_shorten_links($this->content); + $content_shortened = $user->shortenLinks($this->content); if (Message::contentTooLong($content_shortened)) { - $this->showForm(sprintf(_('That\'s too long. ' . - 'Max message size is %d chars.'), + // TRANS: Form validation error displayed when message content is too long. + // TRANS: %d is the maximum number of characters for a message. + $this->showForm(sprintf(_m('That\'s too long. Maximum message size is %d character.', + 'That\'s too long. Maximum message size is %d characters.', + Message::maxContent()), Message::maxContent())); return; } @@ -173,7 +176,7 @@ class NewmessageAction extends Action return; } - $this->notify($user, $this->other, $message); + $message->notify(); if ($this->boolean('ajax')) { $this->startHTML('text/xml;charset=utf-8'); @@ -182,7 +185,7 @@ class NewmessageAction extends Action $this->elementEnd('head'); $this->elementStart('body'); $this->element('p', array('id' => 'command_result'), - sprintf(_('Direct message to %s sent'), + sprintf(_('Direct message to %s sent.'), $this->other->nickname)); $this->elementEnd('body'); $this->elementEnd('html'); @@ -247,12 +250,6 @@ class NewmessageAction extends Action } } - function notify($from, $to, $message) - { - mail_notify_message($message, $from, $to); - // XXX: Jabber, SMS notifications... probably queued - } - // Do nothing (override) function showNoticeForm()