Modul:TemplatePar: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
update
wp>PerfektesChaos (update) |
wp>PerfektesChaos (update) |
||
Zeile 1: | Zeile 1: | ||
--[=[ TemplatePar 2013-05- | --[=[ TemplatePar 2013-05-22 | ||
Template parameter utility | Template parameter utility | ||
* check | * check | ||
Zeile 81: | Zeile 81: | ||
[ "+" ] = "%S" | [ "+" ] = "%S" | ||
} | } | ||
Zeile 554: | Zeile 536: | ||
-- frame:getParent() | -- frame:getParent() | ||
-- failure() | -- failure() | ||
-- mw.text.trim() | |||
-- failsafe() | -- failsafe() | ||
local r = false | local r = false | ||
Zeile 577: | Zeile 560: | ||
else | else | ||
if type( options.key ) == "string" then | if type( options.key ) == "string" then | ||
s = trim( options.key ) | s = mw.text.trim( options.key ) | ||
else | else | ||
s = "+" | s = "+" | ||
Zeile 708: | Zeile 691: | ||
-- false if valid or no answer permitted | -- false if valid or no answer permitted | ||
-- Uses: | -- Uses: | ||
-- trim() | -- mw.text.trim() | ||
-- format() | -- format() | ||
-- failure() | -- failure() | ||
Zeile 714: | Zeile 697: | ||
local r | local r | ||
if type( seek ) == "string" then | if type( seek ) == "string" then | ||
r = trim( seek ) | r = mw.text.trim( seek ) | ||
if #r == 0 then | if #r == 0 then | ||
r = false | r = false | ||
Zeile 800: | Zeile 783: | ||
-- Uses: | -- Uses: | ||
-- form() | -- form() | ||
-- trim() | -- mw.text.trim() | ||
-- TemplatePar.valid() | -- TemplatePar.valid() | ||
local options = { mandatory = { "1" }, | local options = { mandatory = { "1" }, | ||
Zeile 814: | Zeile 797: | ||
local r = form( false, options ) | local r = form( false, options ) | ||
if not r then | if not r then | ||
local s = trim( frame.args[ 2 ] ) | local s = mw.text.trim( frame.args[ 2 ] ) | ||
options = { cat = frame.args.cat, | options = { cat = frame.args.cat, | ||
low = frame.args.low, | low = frame.args.low, |