aboutsummaryrefslogtreecommitdiffstats
path: root/addon/twitter/twitter.php
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-06-30 17:01:26 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2011-06-30 17:01:26 +0200
commit7778dbb67b2c033473b0da9b34df01d28162b5ee (patch)
treecb68ecdcadb886e15cc502b633ca71b874740e55 /addon/twitter/twitter.php
parent762bb8de795f8bb455da969d287397b2fa6a2f82 (diff)
downloadvolse-hubzilla-7778dbb67b2c033473b0da9b34df01d28162b5ee.tar.gz
volse-hubzilla-7778dbb67b2c033473b0da9b34df01d28162b5ee.tar.bz2
volse-hubzilla-7778dbb67b2c033473b0da9b34df01d28162b5ee.zip
twitter and statusnet plugin settings are not parsed on post if their respective submit buttons was not clicked by user
Diffstat (limited to 'addon/twitter/twitter.php')
-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>';