summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorandre-hub <[email protected]>2011-01-15 22:40:47 +0100
committerAndrew Dolgov <[email protected]>2011-01-16 11:04:05 +0300
commit08ac193a414a72fab13934fac0303714a5a38d40 (patch)
tree2f7377cfb57a4c5f880aca083f92e6f0b212d65c /modules
parent69de6b46b2eba1a02808fcb420745e985e97dbbb (diff)
small fixes
Diffstat (limited to 'modules')
-rw-r--r--modules/pref-feeds.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php
index 66902d441..7f1b029a1 100644
--- a/modules/pref-feeds.php
+++ b/modules/pref-feeds.php
@@ -930,19 +930,26 @@
case 0:
print_warning(T_sprintf("Already subscribed to <b>%s</b>.", $feed_url));
break;
+ case 5:
+ print_error(T_sprintf("Could not subscribe to <b>%s</b>.<br>Can't download the Feed URL.", $feed_url));
+ break;
}
if ($p_from != 'tt-rss') {
+ if (!isset($_SERVER['HTTPS'])) $_SERVER['HTTPS'] = 'off';
$tt_uri = ($_SERVER['HTTPS'] != "on" ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . preg_replace('/backend\.php.*$/', 'tt-rss.php', $_SERVER["REQUEST_URI"]);
$tp_uri = ($_SERVER['HTTPS'] != "on" ? 'http://' : 'https://') . $_SERVER['HTTP_HOST'] . preg_replace('/backend\.php.*$/', 'prefs.php', $_SERVER["REQUEST_URI"]);
- $result = db_query($link, "SELECT id FROM ttrss_feeds WHERE
- feed_url = '$feed_url' AND owner_uid = " . $_SESSION["uid"]);
-
- $feed_id = db_fetch_result($result, 0, "id");
+ if ($rc <= 2){
+ $result = db_query($link, "SELECT id FROM ttrss_feeds WHERE
+ feed_url = '$feed_url' AND owner_uid = " . $_SESSION["uid"]);
+ $feed_id = db_fetch_result($result, 0, "id");
+ } else {
+ $feed_id = 0;
+ }
print "<p>";
if ($feed_id) {