aboutsummaryrefslogtreecommitdiffstats
path: root/addon/twitter/twitter.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-06-30 15:31:25 -0700
committerFriendika <info@friendika.com>2011-06-30 15:31:25 -0700
commit4f1213b69f12e6df2350cd21c6de06128a03411d (patch)
treecb68ecdcadb886e15cc502b633ca71b874740e55 /addon/twitter/twitter.php
parent8819c73ba1ae1cbf19d2c517a87d30104d1a5da1 (diff)
parent7778dbb67b2c033473b0da9b34df01d28162b5ee (diff)
downloadvolse-hubzilla-4f1213b69f12e6df2350cd21c6de06128a03411d.tar.gz
volse-hubzilla-4f1213b69f12e6df2350cd21c6de06128a03411d.tar.bz2
volse-hubzilla-4f1213b69f12e6df2350cd21c6de06128a03411d.zip
Merge pull request #132 from fabrixxm/master
Some works on addons and other
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>';