- if (StatusNet::isAjax()) {
- $this->startHTML('text/xml;charset=utf-8');
- $this->elementStart('head');
- // TRANS: Page title after sending a notice.
- $this->element('title', null, _('Notice posted'));
- $this->elementEnd('head');
- $this->elementStart('body');
- $this->showNotice($notice);
- $this->elementEnd('body');
- $this->endHTML();
- exit;
- } else {
- $returnto = $this->trimmed('returnto');
-
- if ($returnto) {
- $url = common_local_url($returnto,
- array('nickname' => $this->scoped->nickname));
- } else {
- $url = common_local_url('shownotice',
- array('notice' => $notice->id));
- }
+ if (!GNUsocial::isAjax()) {
+ $url = common_local_url('shownotice', array('notice' => $this->stored->id));