diff options
author | Sarven Capadisli <csarven@status.net> | 2010-02-13 18:49:14 +0100 |
---|---|---|
committer | Sarven Capadisli <csarven@status.net> | 2010-02-13 18:49:14 +0100 |
commit | 4d050f96f3b6c43ed74521d7a7215676cda6835e (patch) | |
tree | d7f6430a1980d207eac1458f09bfae8d12ceb382 /plugins/OStatus/actions/ostatusinit.php | |
parent | f30af7047b0131f4a7e6ed9c77f49fe5c113ea59 (diff) |
Added XHR channel for OStatus Subscribe button
Diffstat (limited to 'plugins/OStatus/actions/ostatusinit.php')
-rw-r--r-- | plugins/OStatus/actions/ostatusinit.php | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/plugins/OStatus/actions/ostatusinit.php b/plugins/OStatus/actions/ostatusinit.php index 11f81ecb9..d21774420 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() |