Jump to content
Main menu
Main menu
move to sidebar
hide
Vakatasosoko
Tabana levu
Soqosoqo toso
Veisau vovou
Vakawasoma tabana
Veivuke
Tabana vakamareqeti
Vaqaqara
Vaqaqara
Appearance
Soli
Create account
Log in
Personal tools
Soli
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:Check for clobbered parameters
Add languages
Module
Veiwasei
English
Read
Edit source
View history
Iyaya
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
Sema cava oqo
Veisau e veiwekani
Vakavodoka faile
Page information
Get shortened URL
Download QR code
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local p = {} local function trim(s) return s:match('^%s*(.-)%s*$') end local function isnotempty(s) return s and s:match('%S') end function p.check(frame) local args = frame.args local pargs = frame:getParent().args local checknested = isnotempty(args['nested']) local delimiter = isnotempty(args['delimiter']) and args['delimiter'] or ';' local argpairs = {} for k, v in pairs(args) do if type(k) == 'number' then local plist = mw.text.split(v, delimiter) local pfound = {} local count = 0 for ii, vv in ipairs(plist) do vv = trim(vv) if checknested and pargs[vv] or isnotempty(pargs[vv]) then count = count + 1 table.insert(pfound, vv) end end if count > 1 then table.insert(argpairs, pfound) end end end local warnmsg = {} local res = '' local cat = '' if args['cat'] and mw.ustring.match(args['cat'],'^[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]:') then cat = args['cat'] end local template = args['template'] and ' in ' .. args['template'] or '' if #argpairs > 0 then for i, v in ipairs( argpairs ) do table.insert( warnmsg, mw.ustring.format( 'Using more than one of the following parameters%s: <code>%s</code>.', template, table.concat(v, '</code>, <code>') ) ) if cat ~= '' then res = res .. '[[' .. cat .. '|' .. (v[1] == '' and ' ' or '') .. v[1] .. ']]' end end end if #warnmsg > 0 then res = require('Module:If preview')._warning({ table.concat(warnmsg, '<br>') }) .. res end return res end return p
Kena i Soqoni
By saving changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Sasamaki
Veisautaki veivuke
(opens in new window)
Preview page with this template
Wikidata entities used in this page
Module:Check for clobbered parameters
: Sitelink, Description: en
Template used on this page:
Module:Check for clobbered parameters/doc
(
edit
)
Vaqaqara
Vaqaqara
Editing
Module:Check for clobbered parameters
Add languages
Add topic