Module:Global lock

require('Module:No globals') -- Command rule: please don't modify this script unless the evidence consensus is requested. 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', 0) end for k, v in pairs(users) do wpTarget = wpTarget .. v .. '\n' params[1] = v text = text .. '\n* ' .. frame:expandTemplate{title='LockHide', args=params} end wpTarget = mw.text.trim(wpTarget) local link = tostring(mw.uri.fullUrl('Special:MultiLock', {wpTarget=wpTarget})) text = ' [' .. link .. ' Lock all]:' .. text return text end

return p