]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/newnotice.php
reply_to is now stored on the notice, not on the reply record
[quix0rs-gnu-social.git] / actions / newnotice.php
index a7a3f8362ca432e7a1f277097869cb03d524001b..de040ef77a38301d7152c2d9be6043e861dfa6f7 100644 (file)
@@ -36,12 +36,6 @@ class NewnoticeAction extends Action {
 
        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');
@@ -59,6 +53,8 @@ class NewnoticeAction extends Action {
                        return;
                }
 
+               $notice->rendered = common_render_content($notice->content, $notice);
+               
                $id = $notice->insert();
 
                if (!$id) {
@@ -98,7 +94,7 @@ class NewnoticeAction extends Action {
                        $replyto = $this->trimmed('replyto');
                        $profile = Profile::staticGet('nickname', $replyto);
                        if ($profile) {
-                               $content = "@$profile ";
+                               $content = '@' . $profile->nickname . ' ';
                        }
                }
                common_show_header(_t('New notice'), NULL, $content,