summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-04-25 16:00:08 +0100
committerAndrew Dolgov <[email protected]>2007-04-25 16:00:08 +0100
commitf27de5153111f07ecfa6204baa2b77c93b48a09d (patch)
treea6e606e9458ef6c5915fb060c153beebc02c27d3 /functions.php
parentbce7001fd1f1c2f105e7ebe9d1b533cf553bb3c5 (diff)
add auth support to subscribe-to-feed dialog
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/functions.php b/functions.php
index 4044639a5..dee0d08c3 100644
--- a/functions.php
+++ b/functions.php
@@ -2023,7 +2023,8 @@
print "</rpc-reply>";
}
- function subscribe_to_feed($link, $feed_link, $cat_id = 0) {
+ function subscribe_to_feed($link, $feed_link, $cat_id = 0,
+ $auth_login = '', $auth_pass = '') {
# check for feed:http://url
$feed_link = trim(preg_replace("/^feed:/", "", $feed_link));
@@ -2048,13 +2049,14 @@
if (db_num_rows($result) == 0) {
$result = db_query($link,
- "INSERT INTO ttrss_feeds (owner_uid,feed_url,title,cat_id)
+ "INSERT INTO ttrss_feeds
+ (owner_uid,feed_url,title,cat_id, auth_login,auth_pass)
VALUES ('".$_SESSION["uid"]."', '$feed_link',
- '[Unknown]', $cat_qpart)");
+ '[Unknown]', $cat_qpart, '$auth_login', '$auth_pass')");
$result = db_query($link,
"SELECT id FROM ttrss_feeds WHERE feed_url = '$feed_link'
- AND owner_uid = " . $_SESSION["uid"]);
+ AND owner_uid = " . $_SESSION["uid"]);
$feed_id = db_fetch_result($result, 0, "id");