summaryrefslogtreecommitdiff
path: root/plugins/OStatus
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2010-03-02 12:41:18 -0500
committerSarven Capadisli <csarven@status.net>2010-03-02 12:41:18 -0500
commite3c2b8e0b50d750ad35cb313726fd2706684c09b (patch)
tree4ee47b9b399d487a8ce8ad84b6b17b422123fd83 /plugins/OStatus
parent88c33bbb57433b3f10407f590b49d11ec4d5d530 (diff)
Refactored remote subscribe action in OStatus
Diffstat (limited to 'plugins/OStatus')
-rw-r--r--plugins/OStatus/OStatusPlugin.php22
1 files changed, 8 insertions, 14 deletions
diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php
index 64504547f..7b6d22acf 100644
--- a/plugins/OStatus/OStatusPlugin.php
+++ b/plugins/OStatus/OStatusPlugin.php
@@ -706,23 +706,20 @@ class OStatusPlugin extends Plugin
function onStartShowSubscriptionsContent($action)
{
- $user = common_current_user();
- if ($user && ($user->id == $action->profile->id)) {
- $action->elementStart('div', 'entity_actions');
- $action->elementStart('p', array('id' => 'entity_remote_subscribe',
- 'class' => 'entity_subscribe'));
- $action->element('a', array('href' => common_local_url('ostatussub'),
- 'class' => 'entity_remote_subscribe')
- , _m('Subscribe to remote user'));
- $action->elementEnd('p');
- $action->elementEnd('div');
- }
+ $this->showEntityRemoteSubscribe($action);
return true;
}
function onStartShowAllContent($action)
{
+ $this->showEntityRemoteSubscribe($action);
+
+ return true;
+ }
+
+ function showEntityRemoteSubscribe($action)
+ {
$user = common_current_user();
if ($user && ($user->id == $action->profile->id)) {
$action->elementStart('div', 'entity_actions');
@@ -734,11 +731,8 @@ class OStatusPlugin extends Plugin
$action->elementEnd('p');
$action->elementEnd('div');
}
-
- return true;
}
-
/**
* Ping remote profiles with updates to this profile.
* Salmon pings are queued for background processing.