Commit Diff


commit - 76a9a38e0c199dfd2ee26f23792b56e2b77952c2
commit + 5d6193d0d085d8d8ab3c2f6357b3121bbe728a50
blob - 58518b3acbe68a45a2d45866c315ef15fa7b8a40
blob + e3dca64b089f1e1e0d76ef5826837a9f3b31cf50
--- gotwebd/gotweb.c
+++ gotwebd/gotweb.c
@@ -60,7 +60,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[] = {
@@ -232,7 +231,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,
@@ -643,19 +641,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 */
@@ -776,7 +761,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 &&
@@ -786,7 +770,6 @@ gotweb_index_navs(struct request *c, struct gotweb_url
 		*next = (struct gotweb_url){
 			.action = -1,
 			.index_page = qs->index_page + 1,
-			.page = -1,
 		};
 	}
 }
@@ -1069,12 +1052,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 - 10e6fc3016b6d24b44b9fc556d0509f124f4c761
blob + 23dfd5628aac5e91500730e48a91ab1fb553f397
--- gotwebd/gotwebd.h
+++ gotwebd/gotwebd.h
@@ -383,7 +383,6 @@ struct gotwebd {
 struct gotweb_url {
 	int		 action;
 	int		 index_page;
-	int		 page;
 	const char	*commit;
 	const char	*previd;
 	const char	*prevset;
@@ -403,7 +402,6 @@ struct querystring {
 	char		*headref;
 	int		 index_page;
 	char		*path;
-	int		 page;
 };
 
 struct querystring_keys {
@@ -424,7 +422,6 @@ enum querystring_elements {
 	HEADREF,
 	INDEX_PAGE,
 	PATH,
-	PAGE,
 };
 
 enum query_actions {
blob - ae9add1ced0efa1b69df5c648929ad89710387a4
blob + 7f69ce9024e9a57fbdd1f4b1b3aa6f64dacb8aae
--- 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,
 	};