]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Bookmark/newbookmark.php
Merge commit 'refs/merge-requests/164' of git://gitorious.org/statusnet/mainline...
[quix0rs-gnu-social.git] / plugins / Bookmark / newbookmark.php
index d60d3d4670caab9b70be04257e7f8fa96abea0d7..57be783b3805003ad8d4ba8941ded6ae75bc77c2 100644 (file)
@@ -150,7 +150,18 @@ class NewbookmarkAction extends Action
 
         } catch (ClientException $ce) {
             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 {
                 $this->error = $ce->getMessage();
                 $this->showPage();