+ # Default theme uses 'content' for something else
+ $notice->content = $this->trimmed('noticecontent');
+
+ if (!$notice->content) {
+ $this->show_form(_t('No content!'));
+ return;
+ } else if (strlen($notice->content) > 140) {
+ $this->show_form(_t('Notice content too long.'));
+ return;
+ }
+
+ $id = $notice->insert();
+
+ if ($id) {
+ common_broadcast_notices($id);
+ common_redirect(common_local_url('shownotice',
+ array('notice' => $id)), 303);
+ } else {
+ common_server_error(_t('Problem saving notice.'));
+ }