<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://www.verzauberte-welten.de/index.php?action=history&amp;feed=atom&amp;title=Modul%3AProtected_edit_request%2Factive</id>
	<title>Modul:Protected edit request/active - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://www.verzauberte-welten.de/index.php?action=history&amp;feed=atom&amp;title=Modul%3AProtected_edit_request%2Factive"/>
	<link rel="alternate" type="text/html" href="https://www.verzauberte-welten.de/index.php?title=Modul:Protected_edit_request/active&amp;action=history"/>
	<updated>2026-04-06T07:14:17Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Verzauberte Welten e.V.</subtitle>
	<generator>MediaWiki 1.39.8</generator>
	<entry>
		<id>https://www.verzauberte-welten.de/index.php?title=Modul:Protected_edit_request/active&amp;diff=4549&amp;oldid=prev</id>
		<title>imported&gt;Oetterer am 11. Oktober 2014 um 16:51 Uhr</title>
		<link rel="alternate" type="text/html" href="https://www.verzauberte-welten.de/index.php?title=Modul:Protected_edit_request/active&amp;diff=4549&amp;oldid=prev"/>
		<updated>2014-10-11T16:51:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require('Module:No globals')&lt;br /&gt;
&lt;br /&gt;
local yesno, makeMessageBox -- passed in from Module:Protected edit request&lt;br /&gt;
local makeToolbar = require('Module:Toolbar')._main&lt;br /&gt;
local getPagetype = require('Module:Pagetype')._main&lt;br /&gt;
local effectiveProtectionLevel = require('Module:Effective protection level')._main&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
-- Helper functions&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local function makeWikilink(page, display)&lt;br /&gt;
	if display then&lt;br /&gt;
		return mw.ustring.format('[[%s|%s]]', page, display)&lt;br /&gt;
	else&lt;br /&gt;
		return mw.ustring.format('[[%s]]', page)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
-- Title class&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
-- This is basically the mw.title class with some extras thrown in.&lt;br /&gt;
&lt;br /&gt;
local title = {}&lt;br /&gt;
title.__index = title&lt;br /&gt;
&lt;br /&gt;
function title.getProtectionLevelText(protectionLevel)&lt;br /&gt;
	-- Gets the text to use in anchors and urn links.&lt;br /&gt;
	local levels = {unprotected = 'editunprotected', autoconfirmed = 'editsemiprotected', templateeditor = 'edittemplateprotected', sysop = 'editprotected'}&lt;br /&gt;
	return levels[protectionLevel]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function title.new(...)&lt;br /&gt;
	local success, obj = pcall(mw.title.new, ...)&lt;br /&gt;
	if not (success and obj) then return end&lt;br /&gt;
&lt;br /&gt;
	-- Add a protectionLevel property.&lt;br /&gt;
	obj.protectionLevel = effectiveProtectionLevel(obj.exists and 'edit' or 'create', obj)&lt;br /&gt;
	if obj.protectionLevel == '*' then&lt;br /&gt;
		-- Make unprotected pages return &amp;quot;unprotected&amp;quot;.&lt;br /&gt;
		obj.protectionLevel = 'unprotected'&lt;br /&gt;
	elseif obj.protectionLevel == 'user' then&lt;br /&gt;
		-- If we just need to be registered, pretend we need to be autoconfirmed, since it's the closest thing we have.&lt;br /&gt;
		obj.protectionLevel = 'autoconfirmed'&lt;br /&gt;
	elseif obj.protectionLevel == 'accountcreator' then&lt;br /&gt;
		-- Lump titleblacklisted pages in with template-protected pages, since templateeditors can do both.&lt;br /&gt;
		obj.protectionLevel = 'templateeditor'&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Add a pagetype property.&lt;br /&gt;
	obj.pagetype = getPagetype{page = obj.prefixedText, defaultns = 'all'}&lt;br /&gt;
	&lt;br /&gt;
	-- Add link-making methods.&lt;br /&gt;
	function obj:makeUrlLink(query, display)&lt;br /&gt;
		return mw.ustring.format('[%s %s]', self:fullUrl(query), display)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	function obj:makeViewLink(display)&lt;br /&gt;
		return self:makeUrlLink({redirect = 'no'}, display)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	function obj:makeEditLink(display)&lt;br /&gt;
		return self:makeUrlLink({action = 'edit'}, display)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	function obj:makeHistoryLink(display)&lt;br /&gt;
		return self:makeUrlLink({action = 'history'}, display)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	function obj:makeLastEditLink(display)&lt;br /&gt;
		return self:makeUrlLink({diff = 'cur', oldid = 'prev'}, display)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	function obj:makeWhatLinksHereLink(display)&lt;br /&gt;
		return makeWikilink('Special:WhatLinksHere/' .. self.prefixedText, display)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	function obj:makeCompareLink(otherTitle, display)&lt;br /&gt;
		display = display or 'diff'&lt;br /&gt;
		local comparePagesTitle = title.new('Special:ComparePages')&lt;br /&gt;
		return comparePagesTitle:makeUrlLink({page1 = self.prefixedText, page2 = otherTitle.prefixedText}, display)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	function obj:makeLogLink(logType, display)&lt;br /&gt;
		local logTitle = title.new('Special:Log')&lt;br /&gt;
		return logTitle:makeUrlLink({type = logType, page = self.prefixedText}, display)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	function obj:urlEncode()&lt;br /&gt;
		return mw.uri.encode(self.prefixedText, 'WIKI')&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	function obj:makeUrnLink(boxProtectionLevel)&lt;br /&gt;
		-- Outputs a urn link. The protection level is taken from the template, rather than detected from page itself,&lt;br /&gt;
		-- as the detection may be inaccurate for cascade-protected and title-blacklisted pages as of Nov 2013.&lt;br /&gt;
		local protectionLinkText = title.getProtectionLevelText(boxProtectionLevel)&lt;br /&gt;
		return mw.ustring.format('[urn:x-wp-%s:%s &amp;lt;span/&amp;gt;]', protectionLinkText, self:urlEncode())&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Get a subpage title object, but go through pcall rather than use the unprotected mw.title:subPageTitle.&lt;br /&gt;
	function obj:getSubpageTitle(subpage)&lt;br /&gt;
		return title.new(self.prefixedText .. '/' .. subpage)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return obj&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
-- TitleTable class&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local titleTable = {}&lt;br /&gt;
titleTable.__index = titleTable&lt;br /&gt;
&lt;br /&gt;
function titleTable.new(args)&lt;br /&gt;
	-- Get numerical arguments and make title objects for each of them. &lt;br /&gt;
	local nums = {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		if type(k) == 'number' then&lt;br /&gt;
			table.insert(nums, k)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(nums)&lt;br /&gt;
	local titles = {}&lt;br /&gt;
	for _, num in ipairs(nums) do&lt;br /&gt;
		local title = title.new(args[num])&lt;br /&gt;
		table.insert(titles, title)&lt;br /&gt;
	end&lt;br /&gt;
	-- Get the current title, and get the subject title if no titles were specified.&lt;br /&gt;
	titles.currentTitle = mw.title.getCurrentTitle()&lt;br /&gt;
	if #titles &amp;lt; 1 then&lt;br /&gt;
		local subjectNs = titles.currentTitle.subjectNsText&lt;br /&gt;
		if subjectNs ~= '' then&lt;br /&gt;
			subjectNs = subjectNs .. ':'&lt;br /&gt;
		end&lt;br /&gt;
		table.insert(titles, title.new(subjectNs .. titles.currentTitle.text))&lt;br /&gt;
	end&lt;br /&gt;
	-- Set the metatable.&lt;br /&gt;
	setmetatable(titles, titleTable)&lt;br /&gt;
	return titles&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function titleTable:memoize(memoField, func, ...)&lt;br /&gt;
	if self[memoField] ~= nil then&lt;br /&gt;
		return self[memoField]&lt;br /&gt;
	else&lt;br /&gt;
		self[memoField] = func(...)&lt;br /&gt;
		return self[memoField]&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function titleTable:titleIterator()&lt;br /&gt;
	local i = 0&lt;br /&gt;
	local n = #self&lt;br /&gt;
	return function()&lt;br /&gt;
		i = i + 1&lt;br /&gt;
		if i &amp;lt;= n then&lt;br /&gt;
			return self[i]&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function titleTable:hasSameProperty(memoField, getPropertyFunc)&lt;br /&gt;
	-- If the titles table has more than one title in it, check if they have the same property.&lt;br /&gt;
	-- The property is found using the getPropertyFunc function, which takes a title object as its single argument.&lt;br /&gt;
	&lt;br /&gt;
	local function hasSameProperty(getPropertyFunc)&lt;br /&gt;
		local property&lt;br /&gt;
		for i, obj in ipairs(self) do&lt;br /&gt;
			if i == 1 then&lt;br /&gt;
				property = getPropertyFunc(obj)&lt;br /&gt;
			elseif getPropertyFunc(obj) ~= property then&lt;br /&gt;
				return false&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return true&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return self:memoize(memoField, hasSameProperty, getPropertyFunc)&lt;br /&gt;
end	&lt;br /&gt;
&lt;br /&gt;
function titleTable:hasSameExistenceStatus()&lt;br /&gt;
	-- Returns true if all the titles exist, or if they all don't exist. Returns false if there is a mixture of existence statuses.&lt;br /&gt;
	return self:hasSameProperty('sameExistenceStatus', function (title) return title.exists end)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function titleTable:hasSameProtectionStatus()&lt;br /&gt;
	-- Checks if all the titles have the same protection status (either for creation protection or for edit-protection - the two are not mixed).&lt;br /&gt;
	local sameExistenceStatus = self:hasSameExistenceStatus()&lt;br /&gt;
	if sameExistenceStatus then&lt;br /&gt;
		return self:hasSameProperty('sameProtectionStatus', function (title) return title.protectionLevel end)&lt;br /&gt;
	else&lt;br /&gt;
		return sameExistenceStatus&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function titleTable:hasSamePagetype()&lt;br /&gt;
	-- Checks if all the titles have the same pagetype.&lt;br /&gt;
	return self:hasSameProperty('samePagetype', function (title) return title.pagetype end)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function titleTable:propertyExists(memoField, getPropertyFunc)&lt;br /&gt;
	-- Checks if a title with a certain property exists.&lt;br /&gt;
	-- The property is found using the getPropertyFunc function, which takes a title object as its single argument&lt;br /&gt;
	-- and should return a boolean value.&lt;br /&gt;
	local function propertyExists(getPropertyFunc)&lt;br /&gt;
		for titleObj in self:titleIterator() do&lt;br /&gt;
			if getPropertyFunc(titleObj) then&lt;br /&gt;
				return true&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return self:memoize(memoField, propertyExists, getPropertyFunc)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function titleTable:hasNonInterfacePage()&lt;br /&gt;
	return self:propertyExists('nonInterfacePage', function (titleObj) return titleObj.namespace ~= 8 end)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function titleTable:hasTemplateOrModule()&lt;br /&gt;
	return self:propertyExists('templateOrModule', function (titleObj) return titleObj.namespace == 10 or titleObj.namespace == 828 end)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function titleTable:hasNonTemplateOrModule()&lt;br /&gt;
	return self:propertyExists('nontemplateormodule', function (titleobj) return titleobj.namespace ~= 10 and titleobj.namespace ~= 828 end)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function titleTable:hasOtherProtectionLevel(level)&lt;br /&gt;
	for titleObj in self:titleIterator() do&lt;br /&gt;
		if titleObj.protectionLevel ~= level then&lt;br /&gt;
			return true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function titleTable:getProtectionLevels()&lt;br /&gt;
	local function getProtectionLevels()&lt;br /&gt;
		local levels = {}&lt;br /&gt;
		for titleObj in self:titleIterator() do&lt;br /&gt;
			local level = titleObj.protectionLevel&lt;br /&gt;
			levels[level] = true&lt;br /&gt;
		end&lt;br /&gt;
		return levels&lt;br /&gt;
	end&lt;br /&gt;
	return self:memoize('protectionLevels', getProtectionLevels)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
-- Blurb class definition&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local blurb = {}&lt;br /&gt;
blurb.__index = blurb&lt;br /&gt;
&lt;br /&gt;
function blurb.new(titleTable, boxProtectionLevel)&lt;br /&gt;
	local obj = {}&lt;br /&gt;
	obj.titles = titleTable&lt;br /&gt;
	obj.boxProtectionLevel = boxProtectionLevel&lt;br /&gt;
	obj.linkCount = 0 -- Counter for the number of total items in the object's link lists. &lt;br /&gt;
	setmetatable(obj, blurb)&lt;br /&gt;
	return obj&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Static methods --&lt;br /&gt;
&lt;br /&gt;
function blurb.makeParaText(name, val)&lt;br /&gt;
	local pipe = mw.text.nowiki('|')&lt;br /&gt;
	local equals = mw.text.nowiki('=')&lt;br /&gt;
	val = val and (&amp;quot;''&amp;quot; .. val .. &amp;quot;''&amp;quot;) or ''&lt;br /&gt;
	return mw.ustring.format('&amp;lt;code style=&amp;quot;white-space: nowrap;&amp;quot;&amp;gt;%s%s%s%s&amp;lt;/code&amp;gt;', pipe, name, equals, val)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function blurb.makeTemplateLink(s)&lt;br /&gt;
	return mw.ustring.format('%s[[Template:%s|%s]]%s', mw.text.nowiki('{{'), s,	s, mw.text.nowiki('}}'))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function blurb:makeProtectionText()&lt;br /&gt;
	local boxProtectionLevel = self.boxProtectionLevel&lt;br /&gt;
	local levels = {unprotected = 'unprotected', autoconfirmed = 'semi-protected', templateeditor = 'template-protected', sysop = 'fully protected'}&lt;br /&gt;
	for level, protectionText in pairs(levels) do&lt;br /&gt;
		if level == boxProtectionLevel then&lt;br /&gt;
			return mw.ustring.format('[[Help:Protection|%s]]', protectionText)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function blurb.getPagetypePlural(title)&lt;br /&gt;
	local pagetype = title.pagetype&lt;br /&gt;
	if pagetype == 'category' then&lt;br /&gt;
		return 'categories'&lt;br /&gt;
	else&lt;br /&gt;
		return pagetype .. 's'&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Normal methods --&lt;br /&gt;
&lt;br /&gt;
function blurb:makeLinkList(title)&lt;br /&gt;
	local tbargs = {} -- The argument list to pass to Module:Toolbar&lt;br /&gt;
	tbargs.style = 'font-size: smaller;'&lt;br /&gt;
	tbargs.separator = 'dot'&lt;br /&gt;
	-- Page links.&lt;br /&gt;
	table.insert(tbargs, title:makeEditLink('edit'))&lt;br /&gt;
	table.insert(tbargs, title:makeHistoryLink('history'))&lt;br /&gt;
	table.insert(tbargs, title:makeLastEditLink('last'))&lt;br /&gt;
	table.insert(tbargs, title:makeWhatLinksHereLink('links'))&lt;br /&gt;
	-- Sandbox links.&lt;br /&gt;
	local sandboxTitle = title:getSubpageTitle('sandbox')&lt;br /&gt;
	if sandboxTitle and sandboxTitle.exists then&lt;br /&gt;
		table.insert(tbargs, sandboxTitle:makeViewLink('sandbox'))&lt;br /&gt;
		table.insert(tbargs, sandboxTitle:makeEditLink('edit sandbox'))&lt;br /&gt;
		table.insert(tbargs, sandboxTitle:makeHistoryLink('sandbox history'))&lt;br /&gt;
		table.insert(tbargs, sandboxTitle:makeLastEditLink('sandbox last edit'))&lt;br /&gt;
		table.insert(tbargs, title:makeCompareLink(sandboxTitle, 'sandbox diff'))&lt;br /&gt;
	end&lt;br /&gt;
	-- Test cases links.&lt;br /&gt;
	local testcasesTitle = title:getSubpageTitle('testcases')&lt;br /&gt;
	if testcasesTitle and testcasesTitle.exists then&lt;br /&gt;
		table.insert(tbargs, testcasesTitle:makeViewLink('test cases'))&lt;br /&gt;
	end&lt;br /&gt;
	--[[ Transclusion count link.&lt;br /&gt;
	if title.namespace == 10 or title.namespace == 828 then -- Only add the transclusion count link for templates and modules.&lt;br /&gt;
		local tclink = mw.uri.new{&lt;br /&gt;
			host = 'tools.wmflabs.org',&lt;br /&gt;
			path = '/templatecount/index.php',&lt;br /&gt;
			query = {&lt;br /&gt;
				lang = 'en',&lt;br /&gt;
				name = title.text,&lt;br /&gt;
				namespace = title.namespace,&lt;br /&gt;
			},&lt;br /&gt;
			fragment = 'bottom'&lt;br /&gt;
		}&lt;br /&gt;
		tclink = string.format('[%s transclusion count]', tostring(tclink))&lt;br /&gt;
		table.insert(tbargs, tclink)&lt;br /&gt;
	end&lt;br /&gt;
	--]]&lt;br /&gt;
	-- Protection log link.&lt;br /&gt;
	if title.namespace ~= 8 then -- MediaWiki pages don't have protection log entries.&lt;br /&gt;
		table.insert(tbargs, title:makeLogLink('protect', 'protection log'))&lt;br /&gt;
	end&lt;br /&gt;
	self.linkCount = self.linkCount + #tbargs -- Keep track of the number of total links created by the object.&lt;br /&gt;
	return makeToolbar(tbargs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function blurb:makeLinkLists()&lt;br /&gt;
	local titles = self.titles&lt;br /&gt;
	if #titles == 1 then&lt;br /&gt;
		return self:makeLinkList(titles[1])&lt;br /&gt;
	else&lt;br /&gt;
		local ret = {}&lt;br /&gt;
		table.insert(ret, '&amp;lt;ul&amp;gt;')&lt;br /&gt;
		for i, titleObj in ipairs(titles) do&lt;br /&gt;
			table.insert(ret, mw.ustring.format('&amp;lt;li&amp;gt;%s %s&amp;lt;/li&amp;gt;', titleObj:makeViewLink(titleObj.prefixedText), self:makeLinkList(titleObj)))&lt;br /&gt;
		end&lt;br /&gt;
		table.insert(ret, '&amp;lt;/ul&amp;gt;')&lt;br /&gt;
		return table.concat(ret)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function blurb:makeIntro()&lt;br /&gt;
	local titles = self.titles&lt;br /&gt;
	local requested = 'It is requested that'&lt;br /&gt;
	local protectionText&lt;br /&gt;
	if titles:hasNonInterfacePage() then&lt;br /&gt;
		protectionText = ' ' .. self:makeProtectionText()&lt;br /&gt;
	else&lt;br /&gt;
		protectionText = '' -- Interface pages cannot be unprotected, so we don't need to explicitly say they are protected.&lt;br /&gt;
	end&lt;br /&gt;
	-- Deal with cases where we are passed multiple titles.&lt;br /&gt;
	if #titles &amp;gt; 1 then&lt;br /&gt;
		local pagetype&lt;br /&gt;
		if titles:hasSamePagetype() then&lt;br /&gt;
			pagetype = blurb.getPagetypePlural(titles[1])&lt;br /&gt;
		else&lt;br /&gt;
			pagetype = 'pages'&lt;br /&gt;
		end&lt;br /&gt;
		return mw.ustring.format(&amp;quot;'''%s edits be made to the following%s %s''':&amp;quot;, requested, protectionText, pagetype)&lt;br /&gt;
	end&lt;br /&gt;
	-- Deal with cases where we are passed only one title.&lt;br /&gt;
	local title = titles[1]&lt;br /&gt;
	local stringToFormat&lt;br /&gt;
	if title.exists then&lt;br /&gt;
		stringToFormat = '%s an edit be made to the%s %s at %s.'&lt;br /&gt;
	else&lt;br /&gt;
		stringToFormat = '%s the%s %s at %s be created.'&lt;br /&gt;
	end&lt;br /&gt;
	stringToFormat = &amp;quot;'''&amp;quot; .. stringToFormat .. &amp;quot;'''&amp;quot;&lt;br /&gt;
	return mw.ustring.format(stringToFormat, requested, protectionText, title.pagetype, title:makeViewLink(title.prefixedText))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function blurb:makeBody()&lt;br /&gt;
	local titles = self.titles&lt;br /&gt;
	local protectionLevels = titles:getProtectionLevels()&lt;br /&gt;
	local boxProtectionLevel = self.boxProtectionLevel&lt;br /&gt;
	local hasNonInterfacePage = titles:hasNonInterfacePage()&lt;br /&gt;
	local isPlural = false&lt;br /&gt;
	if #titles &amp;gt; 1 then&lt;br /&gt;
		isPlural = true&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local descriptionText = &amp;quot;This template must be followed by a '''complete and specific description''' of the request, &amp;quot;&lt;br /&gt;
	if boxProtectionLevel == 'sysop' or boxProtectionLevel == 'templateeditor' then&lt;br /&gt;
		local editText = 'edit'&lt;br /&gt;
		if isPlural then&lt;br /&gt;
			editText = editText .. 's'&lt;br /&gt;
		end&lt;br /&gt;
		local descriptionCompleteText = mw.ustring.format('so that an editor unfamiliar with the subject matter could complete the requested %s immediately.', editText)&lt;br /&gt;
		descriptionText = descriptionText .. descriptionCompleteText&lt;br /&gt;
	else&lt;br /&gt;
		descriptionText = descriptionText .. 'that is, specify what text should be removed and a verbatim copy of the text that should replace it. '&lt;br /&gt;
			.. [[&amp;quot;Please change ''X''&amp;quot; is '''not acceptable''' and will be rejected; the request '''must''' be of the form &amp;quot;please change ''X'' to ''Y''&amp;quot;.]]&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local smallText = ''&lt;br /&gt;
	if boxProtectionLevel == 'sysop' or boxProtectionLevel == 'templateeditor' then&lt;br /&gt;
		local templateFullText&lt;br /&gt;
		if boxProtectionLevel == 'sysop' then&lt;br /&gt;
			templateFullText = 'fully protected'&lt;br /&gt;
		elseif boxProtectionLevel == 'templateeditor' then&lt;br /&gt;
			templateFullText = 'template-protected'&lt;br /&gt;
		end&lt;br /&gt;
		smallText =	'Edit requests to ' .. templateFullText	.. &amp;quot; pages should only be used for edits that are either '''uncontroversial''' or supported by [[Wikipedia:Consensus|consensus]].&amp;quot;&lt;br /&gt;
			.. &amp;quot; If the proposed edit might be controversial, discuss it on the protected page's talk page '''before''' using this template.&amp;quot;&lt;br /&gt;
	else&lt;br /&gt;
		local userText&lt;br /&gt;
		if boxProtectionLevel == 'autoconfirmed' then&lt;br /&gt;
			userText = 'autoconfirmed user'&lt;br /&gt;
		else&lt;br /&gt;
			userText = 'user'&lt;br /&gt;
		end&lt;br /&gt;
		local answeredPara = blurb.makeParaText('answered', 'no')&lt;br /&gt;
		local stringToFormat =	'The edit may be made by any %s. '&lt;br /&gt;
			.. [[Remember to change the %s parameter to &amp;quot;'''yes'''&amp;quot; when the request has been accepted, rejected or on hold awaiting user input. ]]&lt;br /&gt;
			.. &amp;quot;This is so that inactive or completed requests don't needlessly fill up the edit requests category. &amp;quot;&lt;br /&gt;
			.. 'You may also wish to use the %s template in the response.'&lt;br /&gt;
		smallText = mw.ustring.format(stringToFormat, userText, answeredPara, blurb.makeTemplateLink('ESp'))&lt;br /&gt;
	end&lt;br /&gt;
	if hasNonInterfacePage then&lt;br /&gt;
		smallText = smallText .. ' To request that a page be protected or unprotected, make a protection request.'&lt;br /&gt;
	end&lt;br /&gt;
	if boxProtectionLevel == 'sysop' or boxProtectionLevel == 'templateeditor' then&lt;br /&gt;
		smallText = smallText .. ' When the request has been completed or denied, please add the ' .. blurb.makeParaText('answered', 'yes') .. ' parameter to deactivate the template.'&lt;br /&gt;
	end&lt;br /&gt;
	return mw.ustring.format('%s\n&amp;lt;p style=&amp;quot;font-size:smaller; line-height:1.3em;&amp;quot;&amp;gt;\n%s\n&amp;lt;/p&amp;gt;', descriptionText, smallText)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function blurb:export()&lt;br /&gt;
	local intro = self:makeIntro()&lt;br /&gt;
	local linkLists = self:makeLinkLists()&lt;br /&gt;
	local body = self:makeBody()&lt;br /&gt;
	-- Start long links lists on a new line.&lt;br /&gt;
	local linkListSep = ' '&lt;br /&gt;
	if self.linkCount &amp;gt; 5 then&lt;br /&gt;
		linkListSep = '&amp;lt;br /&amp;gt;'&lt;br /&gt;
	end&lt;br /&gt;
	return mw.ustring.format('%s%s%s\n\n%s', intro, linkListSep, linkLists, body)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
-- Subclass of Module:Protected edit request's box class for active boxes&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local box = {}&lt;br /&gt;
box.__index = box&lt;br /&gt;
&lt;br /&gt;
function box.new(protectionType, args)&lt;br /&gt;
	-- In the inheritance system used here, an object's metatable is its class, and a class's metatable is its superclass&lt;br /&gt;
	local obj = getmetatable(box).new(protectionType, args)&lt;br /&gt;
	setmetatable(obj, box)&lt;br /&gt;
	local boxProtectionLevels = {semi = 'autoconfirmed', template = 'templateeditor', full = 'sysop'}&lt;br /&gt;
	obj.boxProtectionLevel = boxProtectionLevels[protectionType]&lt;br /&gt;
	obj.demo = yesno(args.demo)&lt;br /&gt;
	-- Set dependent objects.&lt;br /&gt;
	obj.titles = titleTable.new(args)&lt;br /&gt;
	if not yesno(args.force) and obj.titles:hasSameProperty('sameProtectionStatus', function (title) return title.protectionLevel end) and obj.titles[1].protectionLevel ~= 'unprotected' then&lt;br /&gt;
		obj.boxProtectionLevel = obj.titles[1].protectionLevel&lt;br /&gt;
	end&lt;br /&gt;
	obj.blurb = blurb.new(obj.titles, obj.boxProtectionLevel)&lt;br /&gt;
	return obj&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function box:setImage()&lt;br /&gt;
	local titles = self.titles&lt;br /&gt;
	local boxProtectionLevel = self.boxProtectionLevel&lt;br /&gt;
	local padlock&lt;br /&gt;
	if boxProtectionLevel == 'sysop' and not titles:hasNonTemplateOrModule() then&lt;br /&gt;
		padlock = 'Padlock-red.png'&lt;br /&gt;
	elseif boxProtectionLevel == 'sysop' then&lt;br /&gt;
		padlock = 'Padlock.png'&lt;br /&gt;
	elseif boxProtectionLevel == 'templateeditor' then&lt;br /&gt;
		padlock = 'Padlock-pink.png'&lt;br /&gt;
	elseif boxProtectionLevel == 'autoconfirmed' then&lt;br /&gt;
		padlock = 'Padlock-silver.png'&lt;br /&gt;
	else&lt;br /&gt;
		padlock = 'Padlock-bronze-open.png'&lt;br /&gt;
	end&lt;br /&gt;
	local stringToFormat = '[[File:%s|%dpx|alt=|link=]]'&lt;br /&gt;
	local smallPadlock = mw.ustring.format(stringToFormat, padlock, 25)&lt;br /&gt;
	local largePadlock = mw.ustring.format(stringToFormat, padlock, 60)&lt;br /&gt;
	self:setArg('smallimage', smallPadlock)&lt;br /&gt;
	self:setArg('image', largePadlock)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function box:setBlurbText()&lt;br /&gt;
	local blurbText = self.blurb:export()&lt;br /&gt;
	self:setArg('text', blurbText)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function box:exportRequestTmbox()&lt;br /&gt;
	self:setImage()&lt;br /&gt;
	self:setBlurbText()&lt;br /&gt;
	self:setArg('class', 'editrequest')&lt;br /&gt;
	self:setArg('id', title.getProtectionLevelText(self.boxProtectionLevel)) -- for anchor. yes, this leads to multiple elements with the same ID. we should probably fix this at some point&lt;br /&gt;
	return makeMessageBox('tmbox', self.tmboxArgs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function box:exportRequestCategories()&lt;br /&gt;
	local cats = {}&lt;br /&gt;
	local boxProtectionLevel = self.boxProtectionLevel&lt;br /&gt;
	local function addCat(cat)&lt;br /&gt;
		table.insert(cats, mw.ustring.format('[[Category:%s]]', cat))&lt;br /&gt;
	end&lt;br /&gt;
	local protectionCats = {&lt;br /&gt;
		autoconfirmed = 'Semi-protected edit requests',&lt;br /&gt;
		templateeditor = 'Template-protected edit requests',&lt;br /&gt;
		sysop = 'Protected edit requests'&lt;br /&gt;
	}&lt;br /&gt;
	addCat(protectionCats[boxProtectionLevel])&lt;br /&gt;
	if self.titles:hasOtherProtectionLevel(boxProtectionLevel) then&lt;br /&gt;
		addCat('Edit requests possibly using incorrect templates')&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(cats)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function box:exportUrnLinks()&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	local boxProtectionLevel = self.boxProtectionLevel&lt;br /&gt;
	for titleObj in self.titles:titleIterator() do&lt;br /&gt;
		table.insert(ret, titleObj:makeUrnLink(boxProtectionLevel))&lt;br /&gt;
	end&lt;br /&gt;
	return mw.ustring.format('&amp;lt;span class=&amp;quot;plainlinks&amp;quot; style=&amp;quot;display:none&amp;quot;&amp;gt;%s&amp;lt;/span&amp;gt;', table.concat(ret))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function box:export()&lt;br /&gt;
	if not self.titles.currentTitle.isTalkPage and not self.demo then&lt;br /&gt;
		return '&amp;lt;span class=&amp;quot;error&amp;quot;&amp;gt;Error: Protected edit requests can only be made on the talk page.&amp;lt;/span&amp;gt;[[Category:Non-talk pages requesting an edit to a protected page]]'&lt;br /&gt;
	end&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	table.insert(ret, self:exportRequestTmbox())&lt;br /&gt;
	table.insert(ret, self:exportUrnLinks())&lt;br /&gt;
	if not self.demo then&lt;br /&gt;
		table.insert(ret, self:exportRequestCategories())&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(ret)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
-- Function exported to Module:Protected edit request&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
return function(superclass, yn, mb)&lt;br /&gt;
	yesno = yn&lt;br /&gt;
	makeMessageBox = mb&lt;br /&gt;
	return setmetatable(box, superclass)&lt;br /&gt;
end&lt;/div&gt;</summary>
		<author><name>imported&gt;Oetterer</name></author>
	</entry>
</feed>