summaryrefslogtreecommitdiff
path: root/plugins/OStatus/actions
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2010-02-22 17:07:48 +0100
committerSarven Capadisli <csarven@status.net>2010-02-22 17:07:48 +0100
commit3569493ba7e77a1a9f19bdbbf3f2d5f262ea8484 (patch)
tree204724f69edfc8e811b75d3ae35417c51f00f5ef /plugins/OStatus/actions
parente6ce04cbce08b9f7d0d74f6fbf86e199af8b865d (diff)
Added link to Subscriptions page to XHR get the ostatus sub form
Diffstat (limited to 'plugins/OStatus/actions')
-rw-r--r--plugins/OStatus/actions/ostatussub.php19
1 files changed, 16 insertions, 3 deletions
diff --git a/plugins/OStatus/actions/ostatussub.php b/plugins/OStatus/actions/ostatussub.php
index 8cb8e2ae7..95dec19af 100644
--- a/plugins/OStatus/actions/ostatussub.php
+++ b/plugins/OStatus/actions/ostatussub.php
@@ -55,7 +55,20 @@ class OStatusSubAction extends Action
function showForm($error=null)
{
$this->error = $error;
- $this->showPage();
+ 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, _m('Subscribe to user'));
+ $this->elementEnd('head');
+ $this->elementStart('body');
+ $this->showContent();
+ $this->elementEnd('body');
+ $this->elementEnd('html');
+ } else {
+ $this->showPage();
+ }
}
function showPageNotice()
@@ -81,7 +94,7 @@ class OStatusSubAction extends Action
$profile = $user->getProfile();
$this->elementStart('form', array('method' => 'post',
- 'id' => 'ostatus_sub',
+ 'id' => 'form_ostatus_sub',
'class' => 'form_settings',
'action' =>
common_local_url('ostatussub')));
@@ -141,7 +154,7 @@ class OStatusSubAction extends Action
if ($this->profile_uri) {
$this->validateAndPreview();
} else {
- $this->showPage();
+ $this->showForm();
}
}
}