function save_new_notice() {
- #remember the current notice
- $current_notice = DB_DataObject::factory('notice');
- $current_notice->limit(1);
- $current_notice->orderBy('created DESC');
- $current_notice->find(1);
-
$user = common_current_user();
assert($user); # XXX: maybe an error instead...
$notice = DB_DataObject::factory('notice');
return;
}
+ $notice->rendered = common_render_content($notice->content, $notice);
+
$id = $notice->insert();
if (!$id) {
$replyto = $this->trimmed('replyto');
$profile = Profile::staticGet('nickname', $replyto);
if ($profile) {
- $content = "@$profile ";
+ $content = '@' . $profile->nickname . ' ';
}
}
common_show_header(_t('New notice'), NULL, $content,