summaryrefslogtreecommitdiff
path: root/actions/newnotice.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-10-28 17:24:53 -0400
committerEvan Prodromou <evan@status.net>2009-10-28 17:24:53 -0400
commitb73d6d18bae0e9046f65eb394c8e593de33f92a4 (patch)
tree981eb242aa4494b8c31604a59cac39116cb4ada4 /actions/newnotice.php
parent3c724ccd0df0d205a9567e435b6060300537f904 (diff)
parent10df75f9a074f2987b3525cd70a129bd26972ebb (diff)
Merge branch '0.9.x' into location
Diffstat (limited to 'actions/newnotice.php')
-rw-r--r--actions/newnotice.php17
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...