From 3569493ba7e77a1a9f19bdbbf3f2d5f262ea8484 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Mon, 22 Feb 2010 17:07:48 +0100 Subject: Added link to Subscriptions page to XHR get the ostatus sub form --- plugins/OStatus/actions/ostatussub.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'plugins/OStatus/actions/ostatussub.php') 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(); } } } -- cgit v1.2.3-54-g00ecf