diff options
author | June McEnroe <june@causal.agency> | 2021-06-12 19:20:47 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-06-12 19:20:47 -0400 |
commit | 9b09a5ff483aef05dc5b4d9ab0fd0243d21cb1d3 (patch) | |
tree | 2a2be7ddda0e4161833e0e35cdf8585aa8016fc7 /atom.c | |
parent | Add margin between header navs (diff) | |
download | bubger-9b09a5ff483aef05dc5b4d9ab0fd0243d21cb1d3.tar.gz bubger-9b09a5ff483aef05dc5b4d9ab0fd0243d21cb1d3.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | atom.c | 12 |
1 files changed, 6 insertions, 6 deletions
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(</feed>), 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( <feed xmlns="http://www.w3.org/2005/Atom"> <generator uri="[generator]">bubger</generator> @@ -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(</feed>), NULL, NULL); } |