diff --git a/backend.php b/backend.php
index 2b527cc17..e929e59a4 100644
--- a/backend.php
+++ b/backend.php
@@ -1536,6 +1536,34 @@
print "
| ";
+ $row_class = toggleEvenOdd($row_class);
+ print "Link to: | ";
+
+ $parent_feed = db_fetch_result($result, 0, "parent_feed");
+
+ print "";
+ print "
";
+
$purge_interval = db_fetch_result($result, 0, "purge_interval");
$row_class = toggleEvenOdd($row_class);
@@ -1579,6 +1607,7 @@
$cat_id = db_escape_string($_POST["catid"]);
$auth_login = db_escape_string($_POST["login"]);
$auth_pass = db_escape_string($_POST["pass"]);
+ $parent_feed = db_escape_string($_POST["pfeed"]);
if (strtoupper($upd_intl) == "DEFAULT")
$upd_intl = 0;
@@ -1598,8 +1627,15 @@
$category_qpart = 'cat_id = NULL';
}
+ if ($parent_feed != 0) {
+ $parent_qpart = "parent_feed = '$parent_feed'";
+ } else {
+ $parent_qpart = 'parent_feed = NULL';
+ }
+
$result = db_query($link, "UPDATE ttrss_feeds SET
$category_qpart,
+ $parent_qpart,
title = '$feed_title', feed_url = '$feed_link',
update_interval = '$upd_intl',
purge_interval = '$purge_intl',
@@ -1836,8 +1872,11 @@
$result = db_query($link, "SELECT
id,title,feed_url,substring(last_updated,1,16) as last_updated,
update_interval,purge_interval,cat_id,
+ parent_feed AS parent_feed_id,
(SELECT title FROM ttrss_feed_categories
- WHERE id = cat_id) AS category
+ WHERE id = cat_id) AS category,
+ (SELECT title FROM ttrss_feeds
+ WHERE id = parent_feed_id) AS parent_title
FROM
ttrss_feeds
WHERE
@@ -1923,8 +1962,14 @@
$edit_title = truncate_string($edit_title, 40);
$edit_link = truncate_string($edit_link, 60);
+ $parent_title = $line["parent_title"];
+ if ($parent_title) {
+ $parent_title = "(linked to
+ $parent_title)";
+ }
+
print "" .
- "$feed_icon $edit_title" . " | ";
+ "$feed_icon $edit_title $parent_title" . "";
print "" .
$edit_link . " | ";
diff --git a/prefs.js b/prefs.js
index 89ad81d38..82d897c97 100644
--- a/prefs.js
+++ b/prefs.js
@@ -677,18 +677,9 @@ function feedEditSave() {
var fcat = document.getElementById("iedit_fcat");
var fcat_id = fcat[fcat.selectedIndex].id;
-
- // notify("Saving feed.");
-
- /* if (upd_intl < 0) {
- notify("Update interval must be >= 0 (0 = default)");
- return;
- }
-
- if (purge_intl < 0) {
- notify("Purge days must be >= 0 (0 = default)");
- return;
- } */
+
+ var pfeed = document.getElementById("iedit_parent_feed");
+ var parent_feed_id = pfeed[pfeed.selectedIndex].id;
if (link.length == 0) {
notify("Feed link cannot be blank.");
@@ -711,7 +702,7 @@ function feedEditSave() {
feed + "&l=" + param_escape(link) + "&t=" + param_escape(title) +
"&ui=" + param_escape(upd_intl) + "&pi=" + param_escape(purge_intl) +
"&catid=" + param_escape(fcat_id) + "&login=" + param_escape(auth_login) +
- "&pass=" + param_escape(auth_pass);
+ "&pfeed=" + param_escape(parent_feed_id) + "&pass=" + param_escape(auth_pass);
xmlhttp.open("POST", "backend.php", true);
xmlhttp.onreadystatechange=feedlist_callback;
diff --git a/tt-rss.css b/tt-rss.css
index fd50263bc..bffbe0e23 100644
--- a/tt-rss.css
+++ b/tt-rss.css
@@ -320,7 +320,8 @@ a:hover {
#iedit_title, #iedit_link, #iedit_regexp, #iedit_descr, #iedit_expr, #iedit_updintl,
#iedit_purgintl, #iedit_ulogin, #iedit_ulevel, #iedit_match, #iedit_feed,
-#iedit_fcat, #iedit_filter_action, #iedit_login, #iedit_pass, #iedit_email {
+#iedit_fcat, #iedit_filter_action, #iedit_login, #iedit_pass, #iedit_email,
+#iedit_parent_feed {
width : 100%;
padding-left : 2px;
}
@@ -910,3 +911,8 @@ img.closeButton {
border-width : 0px;
float : right;
}
+
+span.groupPrompt {
+ font-size : x-small;
+ color : #505050;
+}