summary refs log tree commit diff
path: root/contexts.c
diff options
context:
space:
mode:
Diffstat (limited to 'contexts.c')
-rw-r--r--contexts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/contexts.c b/contexts.c
index 77774ae..d8eb4fd 100644
--- a/contexts.c
+++ b/contexts.c
@@ -26,7 +26,7 @@ const char *ContextsQuery = SQL(
 		SELECT time, context
 		FROM events
 		ORDER BY event DESC
-		LIMIT 500 // TODO: Configurable.
+		LIMIT :recent
 	), activeContexts AS (
 		SELECT name, query
 		FROM contexts
@@ -60,6 +60,7 @@ enum kcgi_err pageContexts(struct kreq *req) {
 		|| htmlNav(&html, network, NULL);
 	if (error) return error;
 
+	dbBindInt(stmt.contexts, ":recent", pageRecent);
 	dbBindText(stmt.contexts, ":network", network);
 	if (pagePublic) dbBindInt(stmt.contexts, ":query", false);