<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AProtected_edit_request</id>
	<title>Module:Protected edit request - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mywikibiz.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AProtected_edit_request"/>
	<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:Protected_edit_request&amp;action=history"/>
	<updated>2026-06-13T18:06:20Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.3</generator>
	<entry>
		<id>https://mywikibiz.com/index.php?title=Module:Protected_edit_request&amp;diff=479047&amp;oldid=prev</id>
		<title>Zoran: Pywikibot 6.4.0</title>
		<link rel="alternate" type="text/html" href="https://mywikibiz.com/index.php?title=Module:Protected_edit_request&amp;diff=479047&amp;oldid=prev"/>
		<updated>2021-07-16T05:31:42Z</updated>

		<summary type="html">&lt;p&gt;Pywikibot 6.4.0&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require('Module:No globals')&lt;br /&gt;
&lt;br /&gt;
local yesno = require('Module:Yesno')&lt;br /&gt;
local makeMessageBox = require('Module:Message box').main&lt;br /&gt;
local getArgs&lt;br /&gt;
&lt;br /&gt;
local activeBox -- lazily initialized if we get an active request&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
-- Box class definition&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;
	local obj = {}&lt;br /&gt;
	obj.args = args&lt;br /&gt;
	setmetatable(obj, box)&lt;br /&gt;
	obj.tmboxArgs = {} -- Used to store arguments to be passed to tmbox by the box:export method.&lt;br /&gt;
	-- Set data fields.&lt;br /&gt;
	obj.tmboxArgs.attrs = { ['data-origlevel'] = protectionType }&lt;br /&gt;
	return obj&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function box:setArg(key, value)&lt;br /&gt;
	-- This sets a value to be passed to tmbox.&lt;br /&gt;
	if key then&lt;br /&gt;
		self.tmboxArgs[key] = value&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function box:export()&lt;br /&gt;
	if not mw.title.getCurrentTitle().isTalkPage and not self.args.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 with an edit request template]]'&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- String together page names provided&lt;br /&gt;
	local titles = {}&lt;br /&gt;
	for k, v in pairs(self.args) do&lt;br /&gt;
		if type(k) == 'number' then&lt;br /&gt;
			table.insert(titles, self.args[k])&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local pagesText&lt;br /&gt;
	if #titles == 0 then&lt;br /&gt;
		pagesText = ''&lt;br /&gt;
	elseif #titles == 1 and mw.title.getCurrentTitle().subjectPageTitle.fullText == titles[1] then&lt;br /&gt;
		pagesText = ''&lt;br /&gt;
	else &lt;br /&gt;
		for i, v in pairs(titles) do&lt;br /&gt;
		    if i == 1 then&lt;br /&gt;
		        pagesText = ' to [[:' .. v .. ']]'&lt;br /&gt;
		    elseif i == #titles then&lt;br /&gt;
		        pagesText = pagesText .. ' and [[:' .. v .. ']]'&lt;br /&gt;
		    else&lt;br /&gt;
		        pagesText = pagesText .. ', [[:' .. v .. ']]'&lt;br /&gt;
		    end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	self:setArg('smalltext', &amp;quot;This [[Wikipedia:Edit requests|edit request]]&amp;quot; .. pagesText ..&lt;br /&gt;
		&amp;quot; has been answered. Set the &amp;lt;code style=\&amp;quot;white-space: nowrap;\&amp;quot;&amp;gt;&amp;amp;#124;answered&amp;amp;#61;&amp;lt;/code&amp;gt; or &amp;lt;code style=\&amp;quot;white-space: nowrap;\&amp;quot;&amp;gt;&amp;amp;#124;ans&amp;amp;#61;&amp;lt;/code&amp;gt; parameter to '''no''' to reactivate your request.&amp;quot;)&lt;br /&gt;
	self:setArg('small', true)&lt;br /&gt;
	self:setArg('class', 'editrequest')&lt;br /&gt;
	return makeMessageBox('tmbox', self.tmboxArgs)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
-- Process arguments and initialise objects&lt;br /&gt;
----------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p._main(protectionType, args)&lt;br /&gt;
	local boxType = box&lt;br /&gt;
	if not yesno(args.answered or args.ans, true) then&lt;br /&gt;
		if not activeBox then&lt;br /&gt;
			activeBox = require('Module:Protected edit request/active')(box, yesno, makeMessageBox)&lt;br /&gt;
		end&lt;br /&gt;
		boxType = activeBox&lt;br /&gt;
	end&lt;br /&gt;
	local requestBox = boxType.new(protectionType, args)&lt;br /&gt;
	return requestBox:export()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local mt = {}&lt;br /&gt;
&lt;br /&gt;
function mt.__index(t, k)&lt;br /&gt;
	if not getArgs then&lt;br /&gt;
		getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
	end&lt;br /&gt;
	return function (frame)&lt;br /&gt;
		return t._main(k, getArgs(frame, {wrappers = {'Template:Edit fully-protected', 'Template:Edit semi-protected', 'Template:Edit template-protected', 'Template:Edit extended-protected', 'Template:Edit interface-protected'}}))&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return setmetatable(p, mt)&lt;/div&gt;</summary>
		<author><name>Zoran</name></author>
	</entry>
</feed>