Bugfix: api/statuses/destroy.:format was outputting deleted notice

twice, causing parsers to fail.
This commit is contained in:
Zach Copley 2010-05-28 06:22:12 +00:00
parent c5b61078e1
commit cef302cacd
1 changed files with 2 additions and 9 deletions

View File

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