Module:Requested move and Module:Requested move/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
m simplify some code (should be a no-op; if there are any errors no discussion is needed before reverting (WP:TPEDISPUTE)) |
SilverLocust (talk | contribs) instead put the protection checks after the error checks |
||
Line 91: | Line 91: | ||
if not validTitle then |
if not validTitle then |
||
-- If invalid, the second parameter is the error message. |
-- If invalid, the second parameter is the error message. |
||
local msg = currentTitle |
|||
return msg |
|||
end |
end |
||
return 'yes' |
return 'yes' |
||
Line 192: | Line 193: | ||
-- multiple nomination. |
-- multiple nomination. |
||
local argsByNumCount = #argsByNum |
local argsByNumCount = #argsByNum |
||
local multi |
local multi |
||
if argsByNumCount >= 2 then |
|||
multi = true |
|||
else |
|||
multi = false |
|||
end |
|||
⚫ | |||
--[[ |
--[[ |
||
-- Validate new params. |
-- Validate new params. |
||
Line 213: | Line 219: | ||
end |
end |
||
end |
end |
||
⚫ | |||
---------------------------------------------------------------------------- |
---------------------------------------------------------------------------- |
||
-- Error checks |
-- Error checks |
||
Line 425: | Line 431: | ||
local rmd = {} |
local rmd = {} |
||
rmd[#rmd + 1] = '{{requested move/dated' |
rmd[#rmd + 1] = '{{requested move/dated/sandbox' |
||
if multi then |
if multi then |
||
Line 508: | Line 514: | ||
-- Talk blurb |
-- Talk blurb |
||
local talk |
local talk |
||
if yesno(args.talk, true) then |
if yesno(args.talk, true) then |
||
talk = frame:expandTemplate{title = 'Requested move/talk'} |
talk = frame:expandTemplate{title = 'Requested move/talk'} |
||
else |
|||
talk = '' |
|||
end |
end |
||