]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Added XHR channel for OStatus Subscribe button
authorSarven Capadisli <csarven@status.net>
Sat, 13 Feb 2010 17:49:14 +0000 (18:49 +0100)
committerSarven Capadisli <csarven@status.net>
Sat, 13 Feb 2010 17:49:14 +0000 (18:49 +0100)
plugins/OStatus/actions/ostatusinit.php

index 11f81ecb96dfd0b1b30c14f61d000d2f9a14a637..d21774420dd4c984d7a894bffe707663ade6cf13 100644 (file)
@@ -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()