]> 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 64fe2494b8f11845675e086d364910e656e8c9a5..de040ef77a38301d7152c2d9be6043e861dfa6f7 100644 (file)
@@ -53,6 +53,8 @@ class NewnoticeAction extends Action {
                        return;
                }
 
+               $notice->rendered = common_render_content($notice->content, $notice);
+               
                $id = $notice->insert();
 
                if (!$id) {
@@ -68,7 +70,9 @@ class NewnoticeAction extends Action {
                        return;
                }
 
+        common_save_replies($notice);  
                common_broadcast_notice($notice);
+               
                $returnto = $this->trimmed('returnto');
                if ($returnto) {
                        $url = common_local_url($returnto,
@@ -86,6 +90,13 @@ class NewnoticeAction extends Action {
 
        function show_form($msg=NULL) {
                $content = $this->trimmed('status_textarea');
+               if (!$content) {
+                       $replyto = $this->trimmed('replyto');
+                       $profile = Profile::staticGet('nickname', $replyto);
+                       if ($profile) {
+                               $content = '@' . $profile->nickname . ' ';
+                       }
+               }
                common_show_header(_t('New notice'), NULL, $content,
                                   array($this, 'show_top'));
                if ($msg) {