]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/favor.php
More space for the counter
[quix0rs-gnu-social.git] / actions / favor.php
index 1dfef9bbb3b97c297a589181c4ad6a25df1c23de..afda93cff29ae109c81a6e287ad797934f7d7814 100644 (file)
@@ -29,7 +29,7 @@ class FavorAction extends Action
         parent::handle($args);
 
         if (!common_logged_in()) {
-            common_user_error(_('Not logged in.'));
+            $this->clientError(_('Not logged in.'));
             return;
         }
 
@@ -48,19 +48,19 @@ class FavorAction extends Action
 
         $token = $this->trimmed('token-'.$notice->id);
         if (!$token || $token != common_session_token()) {
-            $this->client_error(_("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;
         }
 
         if ($user->hasFave($notice)) {
-            $this->client_error(_('This notice is already a favorite!'));
+            $this->clientError(_('This notice is already a favorite!'));
             return;
         }
 
         $fave = Fave::addNew($user, $notice);
 
         if (!$fave) {
-            $this->server_error(_('Could not create favorite.'));
+            $this->serverError(_('Could not create favorite.'));
             return;
         }
 
@@ -68,7 +68,7 @@ class FavorAction extends Action
         $user->blowFavesCache();
         
         if ($this->boolean('ajax')) {
-            common_start_html('text/xml;charset=utf-8', true);
+            $this->startHTML('text/xml;charset=utf-8', true);
             $this->elementStart('head');
             $this->element('title', null, _('Disfavor favorite'));
             $this->elementEnd('head');