- $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);
-
- if (!$notice->update($orig)) {
- common_server_error(_('Problem saving notice.'));
+ $notice = Notice::saveNew($user->id, $content, 'web');
+
+ if (is_string($notice)) {
+ $this->show_form($notice);