newnotice action always returns the notice's URL

Maybe could return conversation URL, but this will do for now.
Courtesy of the Javascript haters.
This commit is contained in:
Mikael Nordfeldth 2015-01-12 12:13:34 +01:00
parent 44455bae2a
commit 65c540478e
1 changed files with 1 additions and 8 deletions

View File

@ -189,14 +189,7 @@ class NewnoticeAction extends FormAction
Event::handle('EndSaveNewNoticeWeb', array($this, $user, &$content_shortened, &$options));
if (!StatusNet::isAjax()) {
$returnto = $this->trimmed('returnto');
if ($returnto) {
$url = common_local_url($returnto,
array('nickname' => $this->scoped->getNickname()));
} else {
$url = common_local_url('shownotice', array('notice' => $this->stored->id));
}
$url = common_local_url('shownotice', array('notice' => $this->stored->id));
common_redirect($url, 303);
}