summaryrefslogtreecommitdiff
path: root/plugins/OStatus/OStatusPlugin.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/OStatus/OStatusPlugin.php')
-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.