summaryrefslogtreecommitdiff
path: root/actions/remotesubscribe.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-12-23 14:33:23 -0500
committerEvan Prodromou <evan@prodromou.name>2008-12-23 14:33:23 -0500
commit04ef1ba8eee7a9e2a565d7b4b747ef607665d562 (patch)
treed56ac33bd6bfb8f8641cc9f63b0f6af52b6edfb9 /actions/remotesubscribe.php
parenteb2f9c98ac115ce67e9a740b200c832153ffa05c (diff)
change function headers to K&R style
Another huge change, for PEAR code standards compliance. Function headers have to be in K&R style (opening brace on its own line), instead of having the opening brace on the same line as the function and parameters. So, a little perl magic found all the function definitions and move the opening brace to the next line (properly indented... usually). darcs-hash:20081223193323-84dde-a28e36ecc66672c783c2842d12fc11043c13ab28.gz
Diffstat (limited to 'actions/remotesubscribe.php')
-rw-r--r--actions/remotesubscribe.php36
1 files changed, 24 insertions, 12 deletions
diff --git a/actions/remotesubscribe.php b/actions/remotesubscribe.php
index be2cb1025..02c026849 100644
--- a/actions/remotesubscribe.php
+++ b/actions/remotesubscribe.php
@@ -23,7 +23,8 @@ require_once(INSTALLDIR.'/lib/omb.php');
class RemotesubscribeAction extends Action {
- function handle($args) {
+ function handle($args)
+ {
parent::handle($args);
@@ -47,7 +48,8 @@ class RemotesubscribeAction extends Action {
}
}
- function get_instructions() {
+ function get_instructions()
+ {
return _('To subscribe, you can [login](%%action.login%%),' .
' or [register](%%action.register%%) a new ' .
' account. If you already have an account ' .
@@ -55,7 +57,8 @@ class RemotesubscribeAction extends Action {
' enter your profile URL below.');
}
- function show_top($err=null) {
+ function show_top($err=null)
+ {
if ($err) {
common_element('div', 'error', $err);
} else {
@@ -67,7 +70,8 @@ class RemotesubscribeAction extends Action {
}
}
- function show_form($err=null) {
+ function show_form($err=null)
+ {
$nickname = $this->trimmed('nickname');
$profile = $this->trimmed('profile_url');
common_show_header(_('Remote subscribe'), null, $err,
@@ -86,7 +90,8 @@ class RemotesubscribeAction extends Action {
common_show_footer();
}
- function remote_subscription() {
+ function remote_subscription()
+ {
$user = $this->get_user();
if (!$user) {
@@ -152,7 +157,8 @@ class RemotesubscribeAction extends Action {
$this->request_authorization($user, $omb, $token, $secret);
}
- function get_user() {
+ function get_user()
+ {
$user = null;
$nickname = $this->trimmed('nickname');
if ($nickname) {
@@ -161,7 +167,8 @@ class RemotesubscribeAction extends Action {
return $user;
}
- function getOmb($xrds) {
+ function getOmb($xrds)
+ {
static $omb_endpoints = array(OMB_ENDPOINT_UPDATEPROFILE, OMB_ENDPOINT_POSTNOTICE);
static $oauth_endpoints = array(OAUTH_ENDPOINT_REQUEST, OAUTH_ENDPOINT_AUTHORIZE,
@@ -221,7 +228,8 @@ class RemotesubscribeAction extends Action {
return $omb;
}
- function getXRD($main_service, $main_xrds) {
+ function getXRD($main_service, $main_xrds)
+ {
$uri = omb_service_uri($main_service);
if (strpos($uri, "#") !== 0) {
# FIXME: more rigorous handling of external service definitions
@@ -242,7 +250,8 @@ class RemotesubscribeAction extends Action {
return null;
}
- function addServices($xrd, $types, &$omb) {
+ function addServices($xrd, $types, &$omb)
+ {
foreach ($types as $type) {
$matches = omb_get_services($xrd, $type);
if ($matches) {
@@ -255,7 +264,8 @@ class RemotesubscribeAction extends Action {
return true;
}
- function request_token($omb) {
+ function request_token($omb)
+ {
$con = omb_oauth_consumer();
$url = omb_service_uri($omb[OAUTH_ENDPOINT_REQUEST]);
@@ -299,7 +309,8 @@ class RemotesubscribeAction extends Action {
return array($return['oauth_token'], $return['oauth_token_secret']);
}
- function request_authorization($user, $omb, $token, $secret) {
+ function request_authorization($user, $omb, $token, $secret)
+ {
global $config; # for license URL
$con = omb_oauth_consumer();
@@ -380,7 +391,8 @@ class RemotesubscribeAction extends Action {
return;
}
- function make_nonce() {
+ function make_nonce()
+ {
return common_good_rand(16);
}
}