diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-03 13:40:26 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-03 13:40:26 -0800 |
commit | a42d1116db06539f2da4eb5332bbdbef5beda3fe (patch) | |
tree | 5c9e3d050e97325c9be5f619d271f2e360579381 /plugins/OStatus/OStatusPlugin.php | |
parent | c04c8ae59a7953a21cc464a49b657dfdc926e009 (diff) |
Separate the UI paths for ostatussub and ostatusgroup. They'll redirect to each other transparently if they find you've put a remote entity of the other type.
Diffstat (limited to 'plugins/OStatus/OStatusPlugin.php')
-rw-r--r-- | plugins/OStatus/OStatusPlugin.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index dc502e52c..b4b446a7f 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -51,8 +51,8 @@ class OStatusPlugin extends Plugin array('action' => 'ostatusinit'), array('nickname' => '[A-Za-z0-9_-]+')); $m->connect('main/ostatussub', array('action' => 'ostatussub')); - $m->connect('main/ostatussub', - array('action' => 'ostatussub'), array('feed' => '[A-Za-z0-9\.\/\:]+')); + $m->connect('main/ostatusgroup', + array('action' => 'ostatusgroup')); // PuSH actions $m->connect('main/push/hub', array('action' => 'pushhub')); @@ -731,7 +731,7 @@ class OStatusPlugin extends Plugin function onStartShowUserGroupsContent($action) { - $this->showEntityRemoteSubscribe($action); + $this->showEntityRemoteSubscribe($action, 'ostatusgroup'); return true; } @@ -745,19 +745,19 @@ class OStatusPlugin extends Plugin function onEndShowGroupsMiniList($action) { - $this->showEntityRemoteSubscribe($action); + $this->showEntityRemoteSubscribe($action, 'ostatusgroup'); return true; } - function showEntityRemoteSubscribe($action) + function showEntityRemoteSubscribe($action, $target='ostatussub') { $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'), + $action->element('a', array('href' => common_local_url($target), 'class' => 'entity_remote_subscribe') , _m('Remote')); $action->elementEnd('p'); |