diff options
author | June McEnroe <june@causal.agency> | 2020-07-12 17:54:23 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-07-12 17:54:23 -0400 |
commit | dda85e243cfb338bdaf0dc992949254a6870aae8 (patch) | |
tree | 309f3c9de350ef6d061e77853149d856b25d5599 | |
parent | Add search paging links (diff) | |
download | scooper-dda85e243cfb338bdaf0dc992949254a6870aae8.tar.gz scooper-dda85e243cfb338bdaf0dc992949254a6870aae8.zip |
Handle no search results
-rw-r--r-- | search.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/search.c b/search.c index 2d6e417..07a8064 100644 --- a/search.c +++ b/search.c @@ -139,5 +139,13 @@ enum kcgi_err searchPage(struct kreq *req) { if (error) return error; } + if (!rows) { + error = 0 + || khtml_elem(&html, KELEM_TR) + || khtml_elem(&html, KELEM_TH) + || khtml_puts(&html, "No matching messages"); + if (error) return error; + } + return htmlFooter(&html) || khtml_close(&html); } |