]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Bugfix: api/statuses/destroy.:format was outputting deleted notice
authorZach Copley <zach@status.net>
Fri, 28 May 2010 06:22:12 +0000 (06:22 +0000)
committerZach Copley <zach@status.net>
Fri, 28 May 2010 06:24:10 +0000 (06:24 +0000)
twice, causing parsers to fail.

actions/apistatusesdestroy.php

index f7d52f020813d5285bb5e2d42f2f46f833bba743..0bfcdd060e18930020a0fe854256dad1dfd5a0b0 100644 (file)
@@ -57,7 +57,7 @@ require_once INSTALLDIR . '/lib/apiauth.php';
 
 class ApiStatusesDestroyAction extends ApiAuthAction
 {
-    var $status                = null;
+    var $status = null;
 
     /**
      * Take arguments for running
@@ -120,18 +120,11 @@ class ApiStatusesDestroyAction extends ApiAuthAction
              $replies->get('notice_id', $this->notice_id);
              $replies->delete();
              $this->notice->delete();
-
-             if ($this->format == 'xml') {
-                 $this->showSingleXmlStatus($this->notice);
-             } elseif ($this->format == 'json') {
-                 $this->show_single_json_status($this->notice);
-             }
+            $this->showNotice();
          } else {
              $this->clientError(_('You may not delete another user\'s status.'),
                  403, $this->format);
          }
-
-        $this->showNotice();
     }
 
     /**