- if (!in_array($_SERVER['REQUEST_METHOD'], array('POST', 'DELETE'))) {
- $this->clientError(_('This method requires a POST or DELETE.'),
- 400, $this->format);
- return;
- }
-
- if (empty($this->notice)) {
- $this->clientError(_('No status found with that ID.'),
- 404, $this->format);
- return;
- }
-
- if ($this->user->id == $this->notice->profile_id) {
- $replies = new Reply;
- $replies->get('notice_id', $this->notice_id);
- $replies->delete();
- $this->notice->delete();
+ if (!in_array($_SERVER['REQUEST_METHOD'], array('POST', 'DELETE'))) {
+ $this->clientError(
+ // TRANS: Client error displayed trying to delete a status not using POST or DELETE.
+ // TRANS: POST and DELETE should not be translated.
+ _('This method requires a POST or DELETE.'),
+ 400,
+ $this->format
+ );
+ return;
+ }