]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Don't expose global Twitter consumer key and secret, because that would be idiotic.
authorZach Copley <zach@status.net>
Wed, 3 Mar 2010 21:05:11 +0000 (13:05 -0800)
committerZach Copley <zach@status.net>
Wed, 3 Mar 2010 21:05:11 +0000 (13:05 -0800)
plugins/TwitterBridge/twitteradminpanel.php

index 0ed53bc05bfb0b28aa89445c0c07d6c6038002c7..a78a92c66732ad6ed790e11d96a0a970c5374c83 100644 (file)
@@ -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();
         }