summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend.php5
-rw-r--r--tt-rss.js12
-rw-r--r--tt-rss.php9
3 files changed, 25 insertions, 1 deletions
diff --git a/backend.php b/backend.php
index 88d19641f..c25410d9a 100644
--- a/backend.php
+++ b/backend.php
@@ -249,6 +249,7 @@
$subop = $_GET["subop"];
$view_mode = $_GET["view"];
$addheader = $_GET["addheader"];
+ $limit = $_GET["limit"];
if (!$skip) $skip = 0;
@@ -338,6 +339,10 @@
if (!$addheader) {
$limit_query_part = "LIMIT ".HEADLINES_PER_PAGE." OFFSET $skip";
+ } else {
+ if ($limit != "All") {
+ $limit_query_part = "LIMIT " . $limit;
+ }
}
$result = pg_query("SELECT
diff --git a/tt-rss.js b/tt-rss.js
index 9b18b79c2..b2adeb1ce 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -229,6 +229,16 @@ function viewfeed(feed, skip, subop) {
view_mode = "All Posts";
}
+ var limitbox = document.getElementById("limitbox");
+
+ var limit;
+
+ if (limitbox) {
+ limit = limitbox.value;
+ } else {
+ limit = "All";
+ }
+
if (skip < 0 || skip > total_feed_entries) {
return;
}
@@ -260,7 +270,7 @@ function viewfeed(feed, skip, subop) {
var query = "backend.php?op=viewfeed&feed=" + param_escape(feed) +
"&skip=" + param_escape(skip) + "&subop=" + param_escape(subop) +
- "&view=" + param_escape(view_mode);
+ "&view=" + param_escape(view_mode) + "&limit=" + limit;
if (search_query != "") {
query = query + "&search=" + param_escape(search_query);
diff --git a/tt-rss.php b/tt-rss.php
index b30c4fcce..385ea487e 100644
--- a/tt-rss.php
+++ b/tt-rss.php
@@ -59,6 +59,15 @@
<option>Starred</option>
</select>
+ &nbsp;Limit:
+
+ <select id="limitbox" onchange="javascript:viewCurrentFeed(0, '')">
+ <option>15</option>
+ <option>30</option>
+ <option>60</option>
+ <option>All</option>
+ </select>
+
&nbsp;Feed: <a class="button"
href="javascript:viewCurrentFeed(0, 'ForceUpdate')">Update</a>