summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-02-26 15:11:20 +0300
committerAndrew Dolgov <[email protected]>2011-02-26 15:11:20 +0300
commitaeaa69919f5da9e4403ca5de620cbed0d548e94d (patch)
tree054d6a7b535ecf07429cc15f9b733c5fa5f3f3de /functions.php
parentd564f2835c6714f73664ae6e6314dbd2d348bea6 (diff)
subcribe_to_feed: only try to use twitter OAuth when authentication information is available (closes #325)
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/functions.php b/functions.php
index 20f205bce..3d02d6c8b 100644
--- a/functions.php
+++ b/functions.php
@@ -2910,7 +2910,12 @@
$update_method = 0;
- if (strpos($url, '://twitter.com') === false) {
+ $result = db_query($link, "SELECT twitter_oauth FROM ttrss_users
+ WHERE id = ".$_SESSION['uid']);
+
+ $has_oauth = db_fetch_result($result, 0, 'twitter_oauth');
+
+ if (!$has_oauth || strpos($url, '://twitter.com') === false) {
if (!fetch_file_contents($url)) return 5;
if (url_is_html($url)) {