summaryrefslogtreecommitdiff
path: root/actions/newnotice.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/newnotice.php')
-rw-r--r--actions/newnotice.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/actions/newnotice.php b/actions/newnotice.php
index 37cca982d..8ea47b235 100644
--- a/actions/newnotice.php
+++ b/actions/newnotice.php
@@ -51,10 +51,15 @@ class NewnoticeAction extends Action {
$this->show_form(_('No content!'));
return;
} else if (mb_strlen($content) > 140) {
- common_debug("Content = '$content'", __FILE__);
- common_debug("mb_strlen(\$content) = " . mb_strlen($content), __FILE__);
- $this->show_form(_('That\'s too long. Max notice size is 140 chars.'));
- return;
+
+ $content = common_shorten_links($content);
+
+ if (mb_strlen($content) > 140) {
+ common_debug("Content = '$content'", __FILE__);
+ common_debug("mb_strlen(\$content) = " . mb_strlen($content), __FILE__);
+ $this->show_form(_('That\'s too long. Max notice size is 140 chars.'));
+ return;
+ }
}
$inter = new CommandInterpreter();