add remote subscribe button for not-logged-in users looking a profile list with local users in it
This commit is contained in:
parent
33af29b47c
commit
ccd0db1e0a
|
@ -229,7 +229,6 @@ class OStatusPlugin extends Plugin
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if we've got remote replies to send via Salmon.
|
* Check if we've got remote replies to send via Salmon.
|
||||||
*
|
*
|
||||||
|
@ -587,7 +586,6 @@ class OStatusPlugin extends Plugin
|
||||||
// Drop the PuSH subscription if there are no other subscribers.
|
// Drop the PuSH subscription if there are no other subscribers.
|
||||||
$oprofile->garbageCollect();
|
$oprofile->garbageCollect();
|
||||||
|
|
||||||
|
|
||||||
$member = Profile::staticGet($user->id);
|
$member = Profile::staticGet($user->id);
|
||||||
|
|
||||||
$act = new Activity();
|
$act = new Activity();
|
||||||
|
@ -806,4 +804,28 @@ class OStatusPlugin extends Plugin
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onStartProfileListItemActionElements($item)
|
||||||
|
{
|
||||||
|
if (!common_logged_in()) {
|
||||||
|
|
||||||
|
$profileUser = User::staticGet('id', $item->profile->id);
|
||||||
|
|
||||||
|
if (!empty($profileUser)) {
|
||||||
|
|
||||||
|
$output = $item->out;
|
||||||
|
|
||||||
|
// Add an OStatus subscribe
|
||||||
|
$output->elementStart('li', 'entity_subscribe');
|
||||||
|
$url = common_local_url('ostatusinit',
|
||||||
|
array('nickname' => $profileUser->nickname));
|
||||||
|
$output->element('a', array('href' => $url,
|
||||||
|
'class' => 'entity_remote_subscribe'),
|
||||||
|
_m('Subscribe'));
|
||||||
|
$output->elementEnd('li');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user