Modul:Vorlage:Anker: Unterschied zwischen den Versionen
2019-12-28
(2019-12-27) |
(2019-12-28) |
||
Zeile 1: | Zeile 1: | ||
local Anchor = { suite = "AnchorTemplate", | local Anchor = { suite = "AnchorTemplate", | ||
serial = "2019-12- | serial = "2019-12-28", | ||
item = 79414611, | item = 79414611, | ||
globals = { TemplUtl = 52364930 } | globals = { TemplUtl = 52364930 } | ||
Zeile 10: | Zeile 10: | ||
local GlobalMod = Anchor | local GlobalMod = Anchor | ||
if mw.site.server:find( ".beta.wmflabs.org", 4, true ) then | |||
require( "Module:No Globals" ) | |||
end | |||
Zeile 272: | Zeile 277: | ||
table.insert( checked,s ) | table.insert( checked,s ) | ||
end | end | ||
local s, unknown | local less, s, unknown | ||
for k, v in pairs( argsT ) do | for k, v in pairs( argsT ) do | ||
if type( k ) == "number" then | |||
v = mw.text.trim( v ) | v = mw.text.trim( v ) | ||
if v | if v == "" then | ||
v = false | |||
end | end | ||
less = ( k < 0 ) | |||
k = false | k = false | ||
else | |||
less = k:match( "^[x%-][1-9]%d*" ) | |||
if less then | |||
k = false | k = false | ||
end | end | ||
end | end | ||
if k then | if k then | ||
if | unknown = unknown or { } | ||
table.insert( unknown, k ) | |||
elseif v then | |||
if less then | |||
further( v ) | |||
else | |||
table.insert( tocheck, v ) | |||
end | end | ||
end | end | ||
end -- for k, v | end -- for k, v | ||
Zeile 458: | Zeile 467: | ||
return Failsafe.failsafe( since ) or "" | return Failsafe.failsafe( since ) or "" | ||
end -- p.failsafe() | end -- p.failsafe() | ||
p.test = function ( argsF, argsT ) | |||
Config.frame = mw.getCurrentFrame() | |||
return main( argsF, argsT ) | |||
end -- p.test() | |||
return p | return p |