From: Sarven Capadisli Date: Sat, 13 Feb 2010 17:49:14 +0000 (+0100) Subject: Added XHR channel for OStatus Subscribe button X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4d050f96f3b6c43ed74521d7a7215676cda6835e;p=quix0rs-gnu-social.git Added XHR channel for OStatus Subscribe button --- diff --git a/plugins/OStatus/actions/ostatusinit.php b/plugins/OStatus/actions/ostatusinit.php index 11f81ecb96..d21774420d 100644 --- a/plugins/OStatus/actions/ostatusinit.php +++ b/plugins/OStatus/actions/ostatusinit.php @@ -67,9 +67,21 @@ class OStatusInitAction extends Action function showForm($err = null) { - $this->err = $err; - $this->showPage(); - + $this->err = $err; + if ($this->boolean('ajax')) { + header('Content-Type: text/xml;charset=utf-8'); + $this->xw->startDocument('1.0', 'UTF-8'); + $this->elementStart('html'); + $this->elementStart('head'); + $this->element('title', null, _('Subscribe to user')); + $this->elementEnd('head'); + $this->elementStart('body'); + $this->showContent(); + $this->elementEnd('body'); + $this->elementEnd('html'); + } else { + $this->showPage(); + } } function showContent()