1
0
Fork 0
forgejo/modules
Kemal Zebari 50917ead5f
Perform Newest sort type correctly when sorting issues (#30644)
Should resolve #30642.

Before this commit, we were treating an empty `?sort=` query parameter
as the correct sorting type (which is to sort issues in descending order
by their created UNIX time). But when we perform `sort=latest`, we did
not include this as a type so we would sort by the most recently updated
when reaching the `default` switch statement block.

This commit fixes this by considering the empty string, "latest", and
just any other string that is not mentioned in the switch statement as
sorting by newest.

(cherry picked from commit 9b7af4340c36d3e1888788499d16f83feeb1601b)
2024-04-28 15:39:00 +02:00
..
actions
activitypub
analyze
assetfs
auth Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
avatar
base
cache
charset
container
csv
emoji
eventsource
generate
git Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
gitgraph
gitrepo
graceful
hcaptcha
highlight
hostmatcher
html
httpcache
httplib
indexer Perform Newest sort type correctly when sorting issues (#30644) 2024-04-28 15:39:00 +02:00
issue/template
json
label
lfs
log Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
markup Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
mcaptcha
metrics
migration
nosql
optional
options
packages Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
paginator
pprof
private
process Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
proxy
proxyprotocol
public
queue
recaptcha
references
regexplru
repository Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
secret
session
setting Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
sitemap
ssh
storage
structs
svg
sync
system
templates Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
test
testlogger
timeutil
translation
turnstile
typesniffer
updatechecker
uri
user
util Enable more revive linter rules (#30608) 2024-04-28 15:39:00 +02:00
validation
web
webhook