From 9cfc649af5e3a397f530475a16a2ae51965e948b Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 25 Aug 2005 12:20:50 +0100 Subject: keyboard navigation and cute active headline selection --- backend.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'backend.php') diff --git a/backend.php b/backend.php index 0105253dc..bc8524742 100644 --- a/backend.php +++ b/backend.php @@ -109,6 +109,31 @@ $subop = $_GET["subop"]; + if ($subop == "getRelativeId") { + $mode = $_GET["mode"]; + $id = $_GET["id"]; + $feed_id = $_GET["feed"]; + + if ($id != 'false' && $feed_id != 'false') { + + if ($mode == 'next') { + $check_qpart = "updated >= "; + } else { + $idcheck_qpart = "id < '$id'"; + } + + $result = pg_query("SELECT id FROM ttrss_entries WHERE + $check_qpart AND + feed_id = '$feed_id' + ORDER BY updated DESC LIMIT 1"); + + $result_id = pg_fetch_result($result, 0, "id"); + + print "M $mode : P $id -> P $result_id : F $feed_id"; + + } + } + if ($subop == "forceUpdateAllFeeds") { update_all_feeds($link, true); outputFeedList($link); -- cgit v1.2.3