+ # Default theme uses 'content' for something else
+ $notice->content = $this->trimmed('status_textarea');
+
+ if (!$notice->content) {
+ $this->show_form(_('No content!'));
+ return;
+ } else if (strlen($notice->content) > 140) {
+ $this->show_form(_('That\'s too long. Max notice size is 140 chars.'));
+ return;
+ }
+
+ $notice->rendered = common_render_content($notice->content, $notice);
+
+ $id = $notice->insert();
+
+ if (!$id) {
+ common_server_error(_('Problem saving notice.'));
+ return;
+ }
+
+ $orig = clone($notice);
+ $notice->uri = common_notice_uri($notice);