From d148926e2b96602707a4b012966e943e865d48d2 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 13 Oct 2005 04:15:09 +0100 Subject: per-feed update intervals --- backend.php | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) (limited to 'backend.php') diff --git a/backend.php b/backend.php index b5de559c9..b947a1471 100644 --- a/backend.php +++ b/backend.php @@ -693,10 +693,15 @@ if ($subop == "editSave") { $feed_title = db_escape_string($_GET["t"]); $feed_link = db_escape_string($_GET["l"]); + $upd_intl = db_escape_string($_GET["ui"]); $feed_id = $_GET["id"]; + if (strtoupper($upd_intl) == "DEFAULT") + $upd_intl = 0; + $result = db_query($link, "UPDATE ttrss_feeds SET - title = '$feed_title', feed_url = '$feed_link' WHERE id = '$feed_id'"); + title = '$feed_title', feed_url = '$feed_link', + update_interval = '$upd_intl' WHERE id = '$feed_id'"); } @@ -743,14 +748,16 @@ "; $result = db_query($link, "SELECT - id,title,feed_url,substring(last_updated,1,16) as last_updated + id,title,feed_url,substring(last_updated,1,16) as last_updated, + update_interval FROM ttrss_feeds ORDER by title"); print "

"; print " - "; + + "; $lnum = 0; @@ -787,7 +794,12 @@ $line["title"] . ""; print ""; - + + if ($line["update_interval"] == "0") + $line["update_interval"] = "Default"; + + print ""; + } else if ($feed_id != $edit_feed_id) { @@ -797,13 +809,19 @@ print ""; print ""; + if ($line["update_interval"] == "0") + $line["update_interval"] = "Default"; + + print ""; + } else { print ""; print ""; print ""; - + print ""; + } if (!$line["last_updated"]) $line["last_updated"] = "Never"; -- cgit v1.2.3
 SelectTitleLinkLast updated
LinkUpdate IntervalLast updated
" . $line["feed_url"] . "" . $line["update_interval"] . "".$line["title"]."".$line["feed_url"]."" . $line["update_interval"] . "