Fix ajax error output
This commit is contained in:
parent
7fb93673bc
commit
4eac561cf6
@ -150,7 +150,18 @@ class NewbookmarkAction extends Action
|
|||||||
|
|
||||||
} catch (ClientException $ce) {
|
} catch (ClientException $ce) {
|
||||||
if ($this->boolean('ajax')) {
|
if ($this->boolean('ajax')) {
|
||||||
throw $ce;
|
header('Content-Type: text/xml;charset=utf-8');
|
||||||
|
$this->xw->startDocument('1.0', 'UTF-8');
|
||||||
|
$this->elementStart('html');
|
||||||
|
$this->elementStart('head');
|
||||||
|
// TRANS: Page title after an AJAX error occurs
|
||||||
|
$this->element('title', null, _('Ajax Error'));
|
||||||
|
$this->elementEnd('head');
|
||||||
|
$this->elementStart('body');
|
||||||
|
$this->element('p', array('id' => 'error'), $ce->getMessage());
|
||||||
|
$this->elementEnd('body');
|
||||||
|
$this->elementEnd('html');
|
||||||
|
return;
|
||||||
} else {
|
} else {
|
||||||
$this->error = $ce->getMessage();
|
$this->error = $ce->getMessage();
|
||||||
$this->showPage();
|
$this->showPage();
|
||||||
|
Loading…
Reference in New Issue
Block a user