]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/disfavor.php
Update favorited for new layout and framework
[quix0rs-gnu-social.git] / actions / disfavor.php
index 9a27f34b16bce59e01f4e9829f7692994536eed9..3e3e4a5476d48e43743c3807cb07f5df20455fd5 100644 (file)
@@ -28,7 +28,7 @@ class DisfavorAction extends Action
         parent::handle($args);
 
         if (!common_logged_in()) {
-            common_user_error(_('Not logged in.'));
+            $this->clientError(_('Not logged in.'));
             return;
         }
 
@@ -46,7 +46,7 @@ class DisfavorAction 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;
         }
 
@@ -54,7 +54,7 @@ class DisfavorAction extends Action
         $fave->user_id = $this->id;
         $fave->notice_id = $notice->id;
         if (!$fave->find(true)) {
-            $this->client_error(_('This notice is not a favorite!'));
+            $this->clientError(_('This notice is not a favorite!'));
             return;
         }
 
@@ -62,14 +62,14 @@ class DisfavorAction extends Action
 
         if (!$result) {
             common_log_db_error($fave, 'DELETE', __FILE__);
-            $this->server_error(_('Could not delete favorite.'));
+            $this->serverError(_('Could not delete favorite.'));
             return;
         }
         
         $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, _('Add to favorites'));
             $this->elementEnd('head');