From 7530d94f05887b8065742adb614c368d8568a22c Mon Sep 17 00:00:00 2001
From: Tobias Grimm
Date: Sun, 31 Jul 2011 02:44:05 +0200
Subject: Add sort parameter to pager of repo list
When the repolist is paged, the page-links are missing the sort parameter,
causing the initial page to be custom sorted, but any clicked page will
then be with the default sort order again.
---
ui-repolist.c | 6 +++---
ui-shared.c | 24 +++++++++++++++---------
ui-shared.h | 2 +-
3 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/ui-repolist.c b/ui-repolist.c
index e138f59..4b21e2f 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -109,13 +109,13 @@ void print_header(int columns)
}
-void print_pager(int items, int pagelen, char *search)
+void print_pager(int items, int pagelen, char *search, char *sort)
{
int i;
html("
");
for(i = 0; i * pagelen < items; i++)
cgit_index_link(fmt("[%d]", i+1), fmt("Page %d", i+1), NULL,
- search, i * pagelen);
+ search, sort, i * pagelen);
html("