]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/newnotice.php
Change the title of NewnoticeAction if replying
[quix0rs-gnu-social.git] / actions / newnotice.php
index 692ba765c8a4dd485b25abb0930e24c3a23b7f2d..ff1af6344255a13626f84181a2e24a16e551f9e2 100644 (file)
@@ -62,6 +62,9 @@ class NewnoticeAction extends FormAction
             // TRANS: Page title after sending a notice.
             return _('Notice posted');
         }
+        if ($this->int('inreplyto')) {
+            return _m('TITLE', 'New reply');
+        }
         // TRANS: Page title for sending a new notice.
         return _m('TITLE','New notice');
     }
@@ -110,7 +113,7 @@ class NewnoticeAction extends FormAction
         $cmd = $inter->handle_command($user, $content);
 
         if ($cmd) {
-            if (StatusNet::isAjax()) {
+            if (GNUsocial::isAjax()) {
                 $cmd->execute(new AjaxWebChannel($this));
             } else {
                 $cmd->execute(new WebChannel($this));
@@ -128,7 +131,7 @@ class NewnoticeAction extends FormAction
                                        Notice::maxContent()));
         }
 
-        $replyto = intval($this->trimmed('inreplyto'));
+        $replyto = $this->int('inreplyto');
         if ($replyto) {
             $options['reply_to'] = $replyto;
         }
@@ -195,7 +198,7 @@ class NewnoticeAction extends FormAction
 
         Event::handle('EndSaveNewNoticeWeb', array($this, $user, &$content_shortened, &$options));
 
-        if (!StatusNet::isAjax()) {
+        if (!GNUsocial::isAjax()) {
             $url = common_local_url('shownotice', array('notice' => $this->stored->id));
             common_redirect($url, 303);
         }