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

View File

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