From 392b6d0459b20ca9efa0ad25eda9755f36b5213c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 22 Nov 2010 16:31:01 +0300 Subject: add config.php defines for twitter, only enable twitter pane when they are filled in --- modules/pref-feeds.php | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) (limited to 'modules/pref-feeds.php') diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index df854f35e..ed320d191 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -1329,31 +1329,35 @@ print ""; #pane - print "
"; + if (defined('CONSUMER_KEY') && CONSUMER_KEY != '') { - $result = db_query($link, "SELECT COUNT(*) AS cid FROM ttrss_users - WHERE twitter_oauth IS NOT NULL AND twitter_oauth != '' AND - id = " . $_SESSION['uid']); - - $is_registered = db_fetch_result($result, 0, "cid") != 0; + print "
"; + + $result = db_query($link, "SELECT COUNT(*) AS cid FROM ttrss_users + WHERE twitter_oauth IS NOT NULL AND twitter_oauth != '' AND + id = " . $_SESSION['uid']); + + $is_registered = db_fetch_result($result, 0, "cid") != 0; + + if (!$is_registered) { + print_notice(__('Before you can update your Twitter feeds, you must register this instance of Tiny Tiny RSS with Twitter.com.')); + } else { + print_notice(__('You have been successfully registered with Twitter.com and should be able to access your Twitter feeds.')); + } + + print ""; + + print " "; + + print ""; + + print "
"; # pane - if (!$is_registered) { - print_notice(__('Before you can update your Twitter feeds, you must register this instance of Tiny Tiny RSS with Twitter.com.')); - } else { - print_notice(__('You have been successfully registered with Twitter.com and should be able to access your Twitter feeds.')); } - print ""; - - print " "; - - print ""; - - print "
"; - print ""; #container } -- cgit v1.2.3