diff options
author | Evan Prodromou <evan@status.net> | 2009-10-28 14:21:51 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-10-28 14:21:51 -0400 |
commit | 6c615f6801540d8b28cdc6d4ecf817943c11db34 (patch) | |
tree | 86967dd32fcbad904cd06b866b2f7cd0e748343e /actions/newnotice.php | |
parent | 7df082abb8f9570e55bac209068146e34b3781b4 (diff) | |
parent | bf701b8235c22e648e44adfed8a9cb8e30cf9eab (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'actions/newnotice.php')
-rw-r--r-- | actions/newnotice.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/actions/newnotice.php b/actions/newnotice.php index 9ee031f93..fe7df0938 100644 --- a/actions/newnotice.php +++ b/actions/newnotice.php @@ -160,18 +160,12 @@ class NewnoticeAction extends Action if (!$content) { $this->clientError(_('No content!')); - } else { - $content_shortened = common_shorten_links($content); - if (Notice::contentTooLong($content_shortened)) { - $this->clientError(sprintf(_('That\'s too long. '. - 'Max notice size is %d chars.'), - Notice::maxContent())); - } + return; } $inter = new CommandInterpreter(); - $cmd = $inter->handle_command($user, $content_shortened); + $cmd = $inter->handle_command($user, $content); if ($cmd) { if ($this->boolean('ajax')) { @@ -182,6 +176,13 @@ class NewnoticeAction extends Action return; } + $content_shortened = common_shorten_links($content); + if (Notice::contentTooLong($content_shortened)) { + $this->clientError(sprintf(_('That\'s too long. '. + 'Max notice size is %d chars.'), + Notice::maxContent())); + } + $replyto = $this->trimmed('inreplyto'); #If an ID of 0 is wrongly passed here, it will cause a database error, #so override it... |