Commit Diff


commit - 72657dc95c57d4424da879f2d70ea0510077562f
commit + e2ac8a3da0010ac9a2d6ed0457d75d71b3a27ce5
blob - bedeb4baba587c7ff5074b8f25ccf65f1ce1e9b6
blob + a3af7ecdcc4dfcc32a7dee15fc4c302b1a627efd
--- gotwebd/gotweb.c
+++ gotwebd/gotweb.c
@@ -59,7 +59,6 @@ static const struct querystring_keys querystring_keys[
 	{ "headref",		HEADREF },
 	{ "index_page",		INDEX_PAGE },
 	{ "path",		PATH },
-	{ "page",		PAGE },
 };
 
 static const struct action_keys action_keys[] = {
@@ -231,7 +230,6 @@ gotweb_process_request(struct request *c)
 		if (binary) {
 			struct gotweb_url url = {
 				.index_page = -1,
-				.page = -1,
 				.action = BLOBRAW,
 				.path = qs->path,
 				.commit = qs->commit,
@@ -642,19 +640,6 @@ qa_found:
 				goto done;
 			}
 			break;
-		case PAGE:
-			if (*value == '\0')
-				break;
-			(*qs)->page = strtonum(value, INT64_MIN,
-			    INT64_MAX, &errstr);
-			if (errstr) {
-				error = got_error_from_errno3(__func__,
-				    "strtonum", errstr);
-				goto done;
-			}
-			if ((*qs)->page < 0)
-				(*qs)->page = 0;
-			break;
 		}
 
 		/* entry found */
@@ -775,7 +760,6 @@ gotweb_index_navs(struct request *c, struct gotweb_url
 		*prev = (struct gotweb_url){
 			.action = -1,
 			.index_page = qs->index_page - 1,
-			.page = -1,
 		};
 	}
 	if (t->next_disp == srv->max_repos_display &&
@@ -785,7 +769,6 @@ gotweb_index_navs(struct request *c, struct gotweb_url
 		*next = (struct gotweb_url){
 			.action = -1,
 			.index_page = qs->index_page + 1,
-			.page = -1,
 		};
 	}
 }
@@ -1068,12 +1051,6 @@ gotweb_render_url(struct request *c, struct gotweb_url
 		sep = "&";
 	}
 
-	if (url->page != -1) {
-		if (tp_writef(c->tp, "%spage=%d", sep, url->page) == -1)
-			return -1;
-		sep = "&";
-	}
-
 	return 0;
 }
 
blob - c6f6315c469836e4424a9d92b00e6adf8fe10965
blob + 4ac6df645c49875304c9cd6afec8cff0c4b8f3b2
--- gotwebd/gotwebd.h
+++ gotwebd/gotwebd.h
@@ -385,7 +385,6 @@ struct gotwebd {
 struct gotweb_url {
 	int		 action;
 	int		 index_page;
-	int		 page;
 	const char	*commit;
 	const char	*previd;
 	const char	*prevset;
@@ -405,7 +404,6 @@ struct querystring {
 	char		*headref;
 	int		 index_page;
 	char		*path;
-	int		 page;
 };
 
 struct querystring_keys {
@@ -426,7 +424,6 @@ enum querystring_elements {
 	HEADREF,
 	INDEX_PAGE,
 	PATH,
-	PAGE,
 };
 
 enum query_actions {
blob - a55f8da771b11abd364a24ae8e9f6fc22975d62c
blob + f5ec9427b8109fc6f4060a3c56f7a842acf8bd5a
--- gotwebd/pages.tmpl
+++ gotwebd/pages.tmpl
@@ -113,7 +113,6 @@ nextsep(char *s, char **t)
 
 	memset(&url, 0, sizeof(url));
 	url.index_page = -1;
-	url.page = -1;
 	url.action = TREE;
 	url.path = qs->path;
 	url.commit = qs->commit;
@@ -172,7 +171,6 @@ nextsep(char *s, char **t)
 
 	memset(&u_path, 0, sizeof(u_path));
 	u_path.index_page = -1;
-	u_path.page = -1;
 	u_path.action = SUMMARY;
 !}
 <!doctype html>
@@ -280,32 +278,26 @@ nextsep(char *s, char **t)
 	struct gotweb_url summary = {
 		.action = SUMMARY,
 		.index_page = -1,
-		.page = -1,
 		.path = repo_dir->name,
 	}, briefs = {
 		.action = BRIEFS,
 		.index_page = -1,
-		.page = -1,
 		.path = repo_dir->name,
 	}, commits = {
 		.action = COMMITS,
 		.index_page = -1,
-		.page = -1,
 		.path = repo_dir->name,
 	}, tags = {
 		.action = TAGS,
 		.index_page = -1,
-		.page = -1,
 		.path = repo_dir->name,
 	}, tree = {
 		.action = TREE,
 		.index_page = -1,
-		.page = -1,
 		.path = repo_dir->name,
 	}, rss = {
 		.action = RSS,
 		.index_page = -1,
-		.page = -1,
 		.path = repo_dir->name,
 	};
 !}
@@ -360,21 +352,18 @@ nextsep(char *s, char **t)
 	diff_url = (struct gotweb_url){
 		.action = DIFF,
 		.index_page = -1,
-		.page = -1,
 		.path = repo_dir->name,
 		.headref = qs->headref,
 	};
 	patch_url = (struct gotweb_url){
 		.action = PATCH,
 		.index_page = -1,
-		.page = -1,
 		.path = repo_dir->name,
 		.headref = qs->headref,
 	};
 	tree_url = (struct gotweb_url){
 		.action = TREE,
 		.index_page = -1,
-		.page = -1,
 		.path = repo_dir->name,
 		.headref = qs->headref,
 	};
@@ -518,19 +507,16 @@ nextsep(char *s, char **t)
 	diff = (struct gotweb_url){
 		.action = DIFF,
 		.index_page = -1,
-		.page = -1,
 		.path = repo_dir->name,
 	};
 	patch = (struct gotweb_url){
 		.action = PATCH,
 		.index_page = -1,
-		.page = -1,
 		.path = repo_dir->name,
 	};
 	tree = (struct gotweb_url){
 		.action = TREE,
 		.index_page = -1,
-		.page = -1,
 		.path = repo_dir->name,
 	};
 !}
@@ -591,7 +577,6 @@ nextsep(char *s, char **t)
 
 	memset(&briefs_url, 0, sizeof(briefs_url));
 	briefs_url.index_page = -1,
-	briefs_url.page = -1,
 	briefs_url.action = BRIEFS,
 	briefs_url.path = qs->path,
 	briefs_url.commit = qs->commit,
@@ -684,7 +669,6 @@ nextsep(char *s, char **t)
 
 	memset(&url, 0, sizeof(url));
 	url.index_page = -1;
-	url.page = -1;
 	url.action = BLOB;
 	url.path = t->qs->path;
 	url.file = readme;
@@ -762,7 +746,6 @@ nextsep(char *s, char **t)
 	mode_t			 mode;
 	struct gotweb_url	 url = {
 	       .index_page = -1,
-	       .page = -1,
 	       .commit = rc->commit_id,
 	       .path = qs->path,
 	};
@@ -865,7 +848,6 @@ nextsep(char *s, char **t)
 	struct gotweb_url	 url = {
 		.action = TAG,
 		.index_page = -1,
-		.page = -1,
 		.path = repo_dir->name,
 		.commit = rt->commit_id,
 	};
@@ -957,7 +939,6 @@ nextsep(char *s, char **t)
 	struct gotweb_url	 patch_url, tree_url = {
 		.action = TREE,
 		.index_page = -1,
-		.page = -1,
 		.path = qs->path,
 		.commit = rc->commit_id,
 	};
@@ -1065,7 +1046,6 @@ nextsep(char *s, char **t)
 	struct gotweb_url	 url = {
 		.action = SUMMARY,
 		.index_page = -1,
-		.page = -1,
 		.path = qs->path,
 	};
 
@@ -1153,7 +1133,6 @@ nextsep(char *s, char **t)
 
 	memset(&briefs_url, 0, sizeof(briefs_url));
 	briefs_url.index_page = -1,
-	briefs_url.page = -1,
 	briefs_url.action = BRIEFS,
 	briefs_url.path = qs->path,
 	briefs_url.commit = qs->commit,
@@ -1218,7 +1197,6 @@ nextsep(char *s, char **t)
 	struct gotweb_url	 url = {
 		.action = DIFF,
 		.index_page = -1,
-		.page = -1,
 		.path = repo_dir->name,
 		.commit = bline->id_str,
 	};
@@ -1289,7 +1267,6 @@ date: {{ datebuf }} {{ "\n" }}
 	struct gotweb_url	 summary = {
 		.action = SUMMARY,
 		.index_page = -1,
-		.page = -1,
 		.path = repo_dir->name,
 	};
 !}
@@ -1324,7 +1301,6 @@ date: {{ datebuf }} {{ "\n" }}
 	struct gotweb_url	 tag = {
 		.action = TAG,
 		.index_page = -1,
-		.page = -1,
 		.path = repo_dir->name,
 		.commit = rt->commit_id,
 	};