[ljcom] r9507: LJSUP-6773 (We should change the logic o...
Committer: ailyin
LJSUP-6773 (We should change the logic of displaying cross-post checkboxes); https://jira.sup.com/browse/LJSUP-6773?focusedCommentId=67643 part B: preserve the state of disabled checkboxesU trunk/cgi-bin/LJ/Setting/TwitterConnect.pm
Modified: trunk/cgi-bin/LJ/Setting/TwitterConnect.pm
===================================================================
--- trunk/cgi-bin/LJ/Setting/TwitterConnect.pm 2010-09-15 14:44:51 UTC (rev 9506)
+++ trunk/cgi-bin/LJ/Setting/TwitterConnect.pm 2010-09-16 05:56:36 UTC (rev 9507)
@@ -79,6 +79,10 @@
return LJ::Request->redirect($addr);
}
+ # in case they are not connected, do not allow them to change
+ # default settings
+ return 1 unless $u->prop('twitter_access_token');
+
if ( $u->is_personal ) {
if ( $class->get_arg( $args, 'repost_entries' ) ) {
$u->third_party_notify_list_add('twitter');
