Module:Requested move: Difference between revisions

Content deleted Content added
m comment tweak
add currentn dupe check
Line 122:
-- Check the arguments
local currentDupes = {}
for i, t in ipairs(argsByNum) do
local current = t.current
Line 150 ⟶ 151:
msg = string.format(msg, current)
return err(msg)
end
-- Check for duplicate current titles
-- We know the id isn't zero because we have already checked for
-- existence.
local currentId = currentTitle.id
if currentDupes[currentId] then
local msg = 'Duplicate title detected ("'
.. currentTitle.prefixedText
.. '"); cannot move the same page to two different places'
return err(msg)
else
currentDupes[currentId] = true
end