forked from GNUsocial/gnu-social
More RESTish URL (/notice/:notice/delete) for notice delete
Also returns to 'top' now after notice deletion.
This commit is contained in:
parent
7d524307d2
commit
ac98600640
@ -68,16 +68,10 @@ class DeletenoticeAction extends FormAction
|
|||||||
$this->notice->delete();
|
$this->notice->delete();
|
||||||
Event::handle('EndDeleteOwnNotice', array($this->scoped->getUser(), $this->notice));
|
Event::handle('EndDeleteOwnNotice', array($this->scoped->getUser(), $this->notice));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$url = common_get_returnto();
|
|
||||||
|
|
||||||
if ($url) {
|
|
||||||
common_set_returnto(null);
|
|
||||||
} else {
|
} else {
|
||||||
$url = common_local_url('public');
|
common_redirect(common_get_returnto(), 303);
|
||||||
}
|
}
|
||||||
|
|
||||||
common_redirect($url, 303);
|
common_redirect(common_local_url('top'), 303);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -244,12 +244,10 @@ class Router
|
|||||||
array('action' => 'shownotice'),
|
array('action' => 'shownotice'),
|
||||||
array('notice' => '[0-9]+'));
|
array('notice' => '[0-9]+'));
|
||||||
|
|
||||||
$m->connect('notice/delete/:notice',
|
$m->connect('notice/:notice/delete',
|
||||||
array('action' => 'deletenotice'),
|
array('action' => 'deletenotice'),
|
||||||
array('notice' => '[0-9]+'));
|
array('notice' => '[0-9]+'));
|
||||||
|
|
||||||
$m->connect('notice/delete', array('action' => 'deletenotice'));
|
|
||||||
|
|
||||||
// conversation
|
// conversation
|
||||||
|
|
||||||
$m->connect('conversation/:id',
|
$m->connect('conversation/:id',
|
||||||
|
Loading…
Reference in New Issue
Block a user