From 339b0b0a4d506638b7b3457db295ab7969e2a9df Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Wed, 3 Mar 2010 13:05:11 -0800 Subject: Don't expose global Twitter consumer key and secret, because that would be idiotic. --- plugins/TwitterBridge/twitteradminpanel.php | 40 +++-------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/plugins/TwitterBridge/twitteradminpanel.php b/plugins/TwitterBridge/twitteradminpanel.php index 0ed53bc05..a78a92c66 100644 --- a/plugins/TwitterBridge/twitteradminpanel.php +++ b/plugins/TwitterBridge/twitteradminpanel.php @@ -225,46 +225,12 @@ class TwitterAdminPanelForm extends AdminForm ); $this->unli(); - $globalConsumerKey = common_config('twitter', 'global_consumer_key'); + $globalConsumerKey = common_config('twitter', 'global_consumer_key'); $globalConsumerSec = common_config('twitter', 'global_consumer_secret'); - if (!empty($globalConsumerKey)) { + if (!empty($globalConsumerKey) && !empty($globalConsumerSec)) { $this->li(); - $this->out->element( - 'label', - array('for' => 'global_consumer_key'), - '' - ); - $this->out->element( - 'input', - array( - 'name' => 'global_consumer_key', - 'type' => 'text', - 'id' => 'global_consumer_key', - 'value' => $globalConsumerKey, - 'disabled' => 'true' - ) - ); - $this->out->element('p', 'form_guide', _('Global consumer key')); - $this->unli(); - - $this->li(); - $this->out->element( - 'label', - array('for' => 'global_consumer_secret'), - '' - ); - $this->out->element( - 'input', - array( - 'name' => 'global_consumer_secret', - 'type' => 'text', - 'id' => 'global_consumer_secret', - 'value' => $globalConsumerSec, - 'disabled' => 'true' - ) - ); - $this->out->element('p', 'form_guide', _('Global consumer secret')); + $this->out->element('p', 'form_guide', _('Note: a global consumer key and secret are set.')); $this->unli(); } -- cgit v1.2.3-54-g00ecf From 6ff994b14c93c51f1af1a52d568ffb3391d9c6db Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 3 Mar 2010 16:25:17 -0500 Subject: Fix to group join event position. --- actions/showgroup.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/actions/showgroup.php b/actions/showgroup.php index a1dc3865b..5704b13d1 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -300,8 +300,8 @@ class ShowgroupAction extends GroupDesignAction $this->elementStart('div', 'entity_actions'); $this->element('h2', null, _('Group actions')); $this->elementStart('ul'); + $this->elementStart('li', 'entity_subscribe'); if (Event::handle('StartGroupSubscribe', array($this, $this->group))) { - $this->elementStart('li', 'entity_subscribe'); $cur = common_current_user(); if ($cur) { if ($cur->isMember($this->group)) { @@ -312,10 +312,9 @@ class ShowgroupAction extends GroupDesignAction $jf->show(); } } - $this->elementEnd('li'); Event::handle('EndGroupSubscribe', array($this, $this->group)); } - + $this->elementEnd('li'); $this->elementEnd('ul'); $this->elementEnd('div'); } -- cgit v1.2.3-54-g00ecf From 219e15ac64b0ceefcd714af27b9bbb53123dbe71 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Wed, 3 Mar 2010 16:26:02 -0500 Subject: Returning true instead for group remote subscription. If not logged in, it gives the chance to use the logged in join/leave instead. --- plugins/OStatus/OStatusPlugin.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index dc502e52c..d28260a4a 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -216,17 +216,14 @@ class OStatusPlugin extends Plugin if (empty($cur)) { // Add an OStatus subscribe - $output->elementStart('li', 'entity_subscribe'); $url = common_local_url('ostatusinit', array('nickname' => $group->nickname)); $output->element('a', array('href' => $url, 'class' => 'entity_remote_subscribe'), _m('Join')); - - $output->elementEnd('li'); } - return false; + return true; } /** -- cgit v1.2.3-54-g00ecf