diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-08-21 07:23:27 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-08-21 07:23:27 -0400 |
commit | de5382d4caaf0b388a4de0243cde9a783a43a541 (patch) | |
tree | 145069a7481816b3deb9c39aed0fd89a2124879a /actions/newmessage.php | |
parent | 6dcded4129cebf2e492499cd258bf14a6e25eff9 (diff) |
message input form correctly shows and check max length
Diffstat (limited to 'actions/newmessage.php')
-rw-r--r-- | actions/newmessage.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/actions/newmessage.php b/actions/newmessage.php index 52d4899ba..cd26e1640 100644 --- a/actions/newmessage.php +++ b/actions/newmessage.php @@ -144,9 +144,10 @@ class NewmessageAction extends Action } else { $content_shortened = common_shorten_links($this->content); - if (mb_strlen($content_shortened) > 140) { - $this->showForm(_('That\'s too long. ' . - 'Max message size is 140 chars.')); + if (Message::contentTooLong($content_shortened)) { + $this->showForm(sprintf(_('That\'s too long. ' . + 'Max message size is %d chars.'), + Message::maxContent())); return; } } |