Mòdul:Wikidades/proves: diferència entre les revisions

Contingut suprimit Contingut afegit
també white/black list0
tablesort2
Línia 1:
-- version 2018100320181028 from master @cawiki
 
local p = {}
Línia 715:
local sorting_col = args.tablesort
local sorting_col_alt = args.tablesortalt or ''
local sorting_col_2 = args.tablesort2
local sorting_up = (args.sorting or "") ~= "-1"
local separator = args.separator
Linha 883 ⟶ 884:
local valuea = sortkeys[a]["col" .. sorting_col] or sortkeys[a]["col" .. sorting_col_alt] or ''
local valueb = sortkeys[b]["col" .. sorting_col] or sortkeys[b]["col" .. sorting_col_alt] or ''
if sorting_col_2 then
valuea = valuea .. sortkeys[a]["col" .. sorting_col_2] or ''
valueb = valueb .. sortkeys[b]["col" .. sorting_col_2] or ''
end
if sorting_up then
return valuea < valueb