mirror of
				https://github.com/go-gitea/gitea
				synced 2025-11-04 05:18:25 +00:00 
			
		
		
		
	Fix pagination on /notifications/watching (#23564)
				
					
				
			The `q` parameter was not rendered in pagination links because `context.Pagination:AddParam` checks for existance of the parameter in `ctx.Data` where it was absent. Added the parameter there to fix it.
This commit is contained in:
		@@ -344,6 +344,9 @@ func NotificationWatching(ctx *context.Context) {
 | 
				
			|||||||
		page = 1
 | 
							page = 1
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						keyword := ctx.FormTrim("q")
 | 
				
			||||||
 | 
						ctx.Data["Keyword"] = keyword
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	var orderBy db.SearchOrderBy
 | 
						var orderBy db.SearchOrderBy
 | 
				
			||||||
	ctx.Data["SortType"] = ctx.FormString("sort")
 | 
						ctx.Data["SortType"] = ctx.FormString("sort")
 | 
				
			||||||
	switch ctx.FormString("sort") {
 | 
						switch ctx.FormString("sort") {
 | 
				
			||||||
@@ -378,7 +381,7 @@ func NotificationWatching(ctx *context.Context) {
 | 
				
			|||||||
			Page:     page,
 | 
								Page:     page,
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		Actor:              ctx.Doer,
 | 
							Actor:              ctx.Doer,
 | 
				
			||||||
		Keyword:            ctx.FormTrim("q"),
 | 
							Keyword:            keyword,
 | 
				
			||||||
		OrderBy:            orderBy,
 | 
							OrderBy:            orderBy,
 | 
				
			||||||
		Private:            ctx.IsSigned,
 | 
							Private:            ctx.IsSigned,
 | 
				
			||||||
		WatchedByID:        ctx.Doer.ID,
 | 
							WatchedByID:        ctx.Doer.ID,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user