Nicht angemeldeter Benutzer - Bearbeiten von Seiten ist nur als angemeldeter Benutzer möglich.
Änderungen
Zur Navigation springen
Zur Suche springen
Zeile 635:
Zeile 635:
− +
− +
− +
− -- return tostring(timea > timeb) or "" +
− return "" -- Aufruf als Statement - keine Auswertung
− -- return tostring(timea < timeb) or "" +
− return "" -- Aufruf als Statement - keine Auswertung
Zeile 669:
Zeile 667:
− -- return tostring(sortkeys[a] > sortkeys [b]) or "" +
− return "" -- Aufruf als Statement - keine Auswertung
− -- return tostring(sortkeys[a] < sortkeys [b]) or "" +
− return "" -- Aufruf als Statement - keine Auswertung
Zeile 682:
Zeile 678:
− -- return ranka < rankb +
− return "" -- Aufruf als Statement - keine Auswertung
keine Bearbeitungszusammenfassung
if type(timea) ~= type(timeb) and not (tonumber(timea) and tonumber(timeb)) then
if type(timea) ~= type(timeb) and not (tonumber(timea) and tonumber(timeb)) then
if tonumber(timea) then return true
if tonumber(timea) then return true
elseif tonumber(timeb) then return false
elseif tonumber(timeb) then return ""
elseif tostring(timea) and tostring(timeb) then
elseif tostring(timea) and tostring(timeb) then
if inverse then return tostring(timea) > tostring(timeb) else return tostring(timea) < tostring(timeb) end
if inverse then return tostring(timea) > tostring(timeb) else return tostring(timea) < tostring(timeb) end
else return "" end -- different types, neither numbers nor strings, no chance to compare => random result to avoid script error
else return "" end -- different types, neither numbers nor strings, no chance to compare => random result to avoid script error
elseif tonumber(timea) and tonumber(timeb) then
elseif tonumber(timea) and tonumber(timeb) then
timea = tonumber(timea) or ""
timea = tonumber(timea)
timeb = tonumber(timeb) or ""
timeb = tonumber(timeb)
end
end
if inverse then
if inverse then
return tostring(timea > timeb) or ""
else
else
return tostring(timea < timeb) or ""
end
end
end
end
comparator = function(a, b)
comparator = function(a, b)
if inverse then
if inverse then
return tostring(sortkeys[a] > sortkeys [b]) or ""
else
else
return tostring(sortkeys[a] < sortkeys [b]) or ""
end
end
end
end
local ranka = rankmap[claims[a].rank or "normal"] .. string.format("%08d", a)
local ranka = rankmap[claims[a].rank or "normal"] .. string.format("%08d", a)
local rankb = rankmap[claims[b].rank or "normal"] .. string.format("%08d", b)
local rankb = rankmap[claims[b].rank or "normal"] .. string.format("%08d", b)
return ranka < rankb
end
end
end
end