Nicht angemeldeter Benutzer - Bearbeiten von Seiten ist nur als angemeldeter Benutzer möglich.

Änderungen

Zur Navigation springen Zur Suche springen
315 Bytes entfernt ,  23:28, 22. Aug. 2017
keine Bearbeitungszusammenfassung
Zeile 635: Zeile 635:  
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 ""
+
return tostring(timea > timeb) or ""
return "" -- Aufruf als Statement - keine Auswertung
   
else
 
else
-- return tostring(timea < timeb) or ""
+
return tostring(timea < timeb) or ""
return "" -- Aufruf als Statement - keine Auswertung
   
end
 
end
 
end
 
end
Zeile 669: Zeile 667:  
comparator = function(a, b)
 
comparator = function(a, b)
 
if inverse then
 
if inverse then
-- return tostring(sortkeys[a] > sortkeys [b]) or ""
+
return tostring(sortkeys[a] > sortkeys [b]) or ""
return "" -- Aufruf als Statement - keine Auswertung
   
else
 
else
-- return tostring(sortkeys[a] < sortkeys [b]) or ""
+
return tostring(sortkeys[a] < sortkeys [b]) or ""
return "" -- Aufruf als Statement - keine Auswertung
   
end
 
end
 
end
 
end
Zeile 682: Zeile 678:  
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
+
return ranka < rankb
return "" -- Aufruf als Statement - keine Auswertung
   
end
 
end
 
end
 
end
Anonymer Benutzer
Cookies helfen uns bei der Bereitstellung von imedwiki. Durch die Nutzung von imedwiki erklärst du dich damit einverstanden, dass wir Cookies speichern.

Navigationsmenü