From: andre-hub Date: Sat, 15 Jan 2011 21:40:47 +0000 (+0100) Subject: small fixes X-Git-Tag: 1.5.1~8 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=08ac193a414a72fab13934fac0303714a5a38d40;p=tt-rss.git small fixes --- diff --git a/functions.php b/functions.php index 7c5a306a..4737e60e 100644 --- a/functions.php +++ b/functions.php @@ -4436,13 +4436,13 @@ $msg"; } - function format_notice($msg) { + function format_notice($msg, $id = "") { global $link; return "
$msg
"; } - function format_error($msg) { + function format_error($msg, $id = "") { global $link; return "
$msg
"; diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 66902d44..7f1b029a 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -930,19 +930,26 @@ case 0: print_warning(T_sprintf("Already subscribed to %s.", $feed_url)); break; + case 5: + print_error(T_sprintf("Could not subscribe to %s.
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 "

"; if ($feed_id) {