aboutsummaryrefslogtreecommitdiffstats
path: root/addon/twitter
diff options
context:
space:
mode:
Diffstat (limited to 'addon/twitter')
-rw-r--r--addon/twitter/twitter.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/addon/twitter/twitter.php b/addon/twitter/twitter.php
index 7829799bc..183c71126 100644
--- a/addon/twitter/twitter.php
+++ b/addon/twitter/twitter.php
@@ -76,6 +76,9 @@ function twitter_jot_nets(&$a,&$b) {
function twitter_settings_post ($a,$post) {
if(! local_user())
return;
+ // don't check twitter settings if twitter submit button is not clicked
+ if (!x($_POST,'twitter-submit')) return;
+
if (isset($_POST['twitter-disconnect'])) {
/***
* if the twitter-disconnect checkbox is set, clear the OAuth key/secret pair
@@ -159,7 +162,7 @@ function twitter_settings(&$a,&$s) {
$s .= '<input id="twitter-token" type="hidden" name="twitter-token" value="'.$token.'" />';
$s .= '<input id="twitter-token2" type="hidden" name="twitter-token2" value="'.$request_token['oauth_token_secret'].'" />';
$s .= '</div><div class="clear"></div>';
- $s .= '<div class="settings-submit-wrapper" ><input type="submit" name="submit" class="settings-submit" value="' . t('Submit') . '" /></div>';
+ $s .= '<div class="settings-submit-wrapper" ><input type="submit" name="twitter-submit" class="settings-submit" value="' . t('Submit') . '" /></div>';
} else {
/***
* we have an OAuth key / secret pair for the user
@@ -178,7 +181,7 @@ function twitter_settings(&$a,&$s) {
$s .= '<label id="twitter-disconnect-label" for="twitter-disconnect">'. t('Clear OAuth configuration') .'</label>';
$s .= '<input id="twitter-disconnect" type="checkbox" name="twitter-disconnect" value="1" />';
$s .= '</div><div class="clear"></div>';
- $s .= '<div class="settings-submit-wrapper" ><input type="submit" name="submit" class="settings-submit" value="' . t('Submit') . '" /></div>';
+ $s .= '<div class="settings-submit-wrapper" ><input type="submit" name="twitter-submit" class="settings-submit" value="' . t('Submit') . '" /></div>';
}
}
$s .= '</div><div class="clear"></div></div>';