]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/repeat.php
Fix inconsistencies in clientError() messages
[quix0rs-gnu-social.git] / actions / repeat.php
index a1c5f443fb70507876009423d9419d9c9d08e8de..893cae4ffd8f2feae1b802b6011b8b239bdae875 100644 (file)
@@ -54,21 +54,21 @@ class RepeatAction extends Action
         $this->user = common_current_user();
 
         if (empty($this->user)) {
-            $this->clientError(_("Only logged-in users can repeat notices."));
+            $this->clientError(_('Only logged-in users can repeat notices.'));
             return false;
         }
 
         $id = $this->trimmed('notice');
 
         if (empty($id)) {
-            $this->clientError(_("No notice specified."));
+            $this->clientError(_('No notice specified.'));
             return false;
         }
 
         $this->notice = Notice::staticGet('id', $id);
 
         if (empty($this->notice)) {
-            $this->clientError(_("No notice specified."));
+            $this->clientError(_('No notice specified.'));
             return false;
         }
 
@@ -80,14 +80,14 @@ class RepeatAction extends Action
         $token  = $this->trimmed('token-'.$id);
 
         if (empty($token) || $token != common_session_token()) {
-            $this->clientError(_("There was a problem with your session token. Try again, please."));
+            $this->clientError(_('There was a problem with your session token. Try again, please.'));
             return false;
         }
 
         $profile = $this->user->getProfile();
 
         if ($profile->hasRepeated($id)) {
-            $this->clientError(_("You already repeated that notice."));
+            $this->clientError(_('You already repeated that notice.'));
             return false;
         }
 
@@ -106,13 +106,17 @@ class RepeatAction extends Action
     {
         $repeat = $this->notice->repeat($this->user->id, 'web');
 
+
+
         if ($this->boolean('ajax')) {
             $this->startHTML('text/xml;charset=utf-8');
             $this->elementStart('head');
             $this->element('title', null, _('Repeated'));
             $this->elementEnd('head');
             $this->elementStart('body');
-            $this->element('p', array('id' => 'repeat_response'), _('Repeated!'));
+            $this->element('p', array('id' => 'repeat_response',
+                                      'class' => 'repeated'),
+                                _('Repeated!'));
             $this->elementEnd('body');
             $this->elementEnd('html');
         } else {