forked from hummypkg/webif
Avoid sort order build-up in sort URL parameter string
Fixes behaviour where each new sort added &order=n to the query string.
This commit is contained in:
parent
478d9db2e2
commit
9cf915e5f7
@ -379,7 +379,8 @@ foreach sl $sortlist {
|
||||
|
||||
set tag " (current)"
|
||||
if {$order != $index} {
|
||||
puts "<a href=\"$env(SCRIPT_NAME)?$env(QUERY_STRING)&order=$index\">"
|
||||
set qs [regsub -all {&order=[[[:digit:]]+} $env(QUERY_STRING) ""]
|
||||
puts "<a href=\"$env(SCRIPT_NAME)?$qs&order=$index\">"
|
||||
set tag ""
|
||||
}
|
||||
puts "<img class=va border=0 src=/img/$img.gif> $descr$tag"
|
||||
|
Loading…
Reference in New Issue
Block a user