From 9b09a5ff483aef05dc5b4d9ab0fd0243d21cb1d3 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sat, 12 Jun 2021 19:20:47 -0400 Subject: Use SEARCH for a subset of thread roots This does way less duplicate work by fetching all threads and all thread root envelopes once, then doing searches for subsets of thread roots. --- atom.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'atom.c') diff --git a/atom.c b/atom.c index a58f71c..b49a2b7 100644 --- a/atom.c +++ b/atom.c @@ -163,18 +163,18 @@ int atomThreadClose(FILE *file) { return templateRender(file, Q(), NULL, NULL); } -static char *atomSearchURL(const char *name, const char *type) { +static char *atomIndexURL(const char *name, const char *type) { struct Variable vars[] = { { "name", name }, { "type", type }, {0}, }; - return templateString("/" PATH_SEARCH, vars, escapeURL); + return templateString("/" PATH_INDEX, vars, escapeURL); } -int atomSearchOpen(FILE *file, const char *name) { - char *atom = atomSearchURL(name, "atom"); - char *html = atomSearchURL(name, "html"); +int atomIndexOpen(FILE *file, const char *name) { + char *atom = atomIndexURL(name, "atom"); + char *html = atomIndexURL(name, "html"); const char *template = XML_DECL Q( bubger @@ -200,6 +200,6 @@ int atomSearchOpen(FILE *file, const char *name) { return error; } -int atomSearchClose(FILE *file) { +int atomIndexClose(FILE *file) { return templateRender(file, Q(), NULL, NULL); } -- cgit 1.4.1