summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--search.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/search.c b/search.c
index d2bd4ca..95cac1d 100644
--- a/search.c
+++ b/search.c
@@ -41,6 +41,7 @@ const char *SearchQuery = SQL(
 		AND coalesce(contexts.name = :context, true)
 		AND contexts.query <= NOT :public
 		AND search MATCH :query
+	ORDER BY search.rowid DESC
 	LIMIT :offset, :limit;
 );
 
@@ -90,7 +91,7 @@ enum kcgi_err searchPage(struct kreq *req) {
 			|| khtml_attr(&html, KELEM_TR, KATTR_CLASS, "page", KATTR__MAX)
 			|| khtml_attr(&html, KELEM_TH, KATTR_COLSPAN, "5", KATTR__MAX)
 			|| khtml_attr(&html, KELEM_A, KATTR_HREF, href, KATTR__MAX)
-			|| khtml_puts(&html, "Earlier results")
+			|| khtml_puts(&html, "Later results")
 			|| khtml_closeelem(&html, 3);
 		free(href);
 		if (error) return error;
@@ -138,7 +139,7 @@ enum kcgi_err searchPage(struct kreq *req) {
 			|| khtml_attr(&html, KELEM_TR, KATTR_CLASS, "page", KATTR__MAX)
 			|| khtml_attr(&html, KELEM_TH, KATTR_COLSPAN, "5", KATTR__MAX)
 			|| khtml_attr(&html, KELEM_A, KATTR_HREF, href, KATTR__MAX)
-			|| khtml_puts(&html, "Later results")
+			|| khtml_puts(&html, "Earlier results")
 			|| khtml_closeelem(&html, 3);
 		free(href);
 		if (error) return error;
9-09-10Add title -v flagJune McEnroe 2019-09-10Use curl error bufferJune McEnroe 2019-09-10Set Accept-Encoding in titleJune McEnroe 2019-09-08Set title User-AgentJune McEnroe 2019-09-07Add -x flag to titleJune McEnroe 2019-09-07Ignore SIGPIPE in relayJune McEnroe 2019-09-07Add A Memory Called EmpireJune McEnroe 2019-09-05Handle lack of Content-TypeJune McEnroe 2019-09-05Use CURLINFO_CONTENT_TYPEJune McEnroe 2019-09-05Decode entities in titlesJune McEnroe 2019-09-05Print title as soon as it's availableJune McEnroe 2019-09-05Use CURL_PREFIX to set flagsJune McEnroe 2019-09-05Add titleJune McEnroe 2019-09-04Add Avorter n'est pas tuerJune McEnroe 2019-08-29Unset executable on shell scriptsJune McEnroe 2019-08-29Add long-missing setopt to bin.7June McEnroe 2019-08-29Add editJune McEnroe