Module:Global lock

require('Module:No globals')

local p = {}

function p.multi_lock(frame) local text = '' local users = {} local params = {} local wpTarget = '' for k, v in pairs(frame:getParent.args) do		if v and (v ~= '') then if type (k) == 'number' then users[k] = v			else params[k] = v			end end end if #users == 0 then error('You must specify at least one user.') end for k, v in pairs(users) do wpTarget = wpTarget .. mw.uri.encode(v) .. '%0A' params[1] = v text = text .. '\n* ' .. frame:expandTemplate{title='LockHide', args=params} end local link = tostring(mw.uri.fullUrl('Special:MultiLock', {'wpTarget', wpTarget})) text = ' [' .. link .. ' Lock all]:' .. text return text end

return p