From f9bb95174b93de4ce28167eea21535a01394f71f Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Sat, 31 Oct 2009 16:14:38 +0100 Subject: Added XHR for direct messages. --- actions/newmessage.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'actions/newmessage.php') diff --git a/actions/newmessage.php b/actions/newmessage.php index eac4ab210..37fca1ca2 100644 --- a/actions/newmessage.php +++ b/actions/newmessage.php @@ -223,7 +223,22 @@ class NewmessageAction extends Action } $this->msg = $msg; - $this->showPage(); + if ($this->trimmed('ajax')) { + $this->startHTML('text/xml;charset=UTF-8'); + $this->elementStart('head'); + $this->element('title', null, _('New message')); + $this->elementEnd('head'); + $this->elementStart('body'); + if (common_logged_in()) { + $this->showNoticeForm(); + } + $this->elementEnd('div'); + $this->elementEnd('body'); + $this->endHTML(); + } + else { + $this->showPage(); + } } function showPageNotice() -- cgit v1.2.3-54-g00ecf