https://en.seminaverbi.bibleget.io/w/index.php?title=Module:Pp-move-indef&feed=atom&action=historyModule:Pp-move-indef - Revision history2024-03-28T23:29:52ZRevision history for this page on the wikiMediaWiki 1.41.0https://en.seminaverbi.bibleget.io/w/index.php?title=Module:Pp-move-indef&diff=22356&oldid=prevJohnrdorazio: 1 revision imported2020-09-04T02:34:34Z<p>1 revision imported</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 02:34, September 4, 2020</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>Johnrdoraziohttps://en.seminaverbi.bibleget.io/w/index.php?title=Module:Pp-move-indef&diff=22355&oldid=preven>Mr. Stradivarius: make fixes for when we are called from #invoke - the title parameter becomes a frame object2014-09-18T01:37:33Z<p>make fixes for when we are called from #invoke - the title parameter becomes a frame object</p>
<p><b>New page</b></p><div>-- This module implements [[Template:Pp-move-indef]].<br />
<br />
local p = {}<br />
<br />
function p.main(title)<br />
if type(title) == 'string' then<br />
title = mw.title.new(title)<br />
elseif type(title) ~= 'table' or not title.text or not title.getContent then<br />
-- The title parameter is absent or not a title object. It could be a<br />
-- frame object if we are being called from #invoke.<br />
title = mw.title.getCurrentTitle()<br />
end<br />
<br />
local level = title<br />
and title.protectionLevels<br />
and title.protectionLevels.move<br />
and title.protectionLevels.move[1]<br />
local namespace = title and title.namespace<br />
<br />
local category<br />
if level == 'sysop' or level == 'templateeditor' then<br />
if namespace == 2 or namespace == 3 then<br />
category = 'Wikipedia move-protected user and user talk pages'<br />
elseif namespace == 4 or namepace == 12 then<br />
category = 'Wikipedia move-protected project pages'<br />
elseif namespace == 100 then<br />
category = 'Wikipedia move-protected portals'<br />
elseif title.isTalkPage then<br />
category = 'Wikipedia move-protected talk pages'<br />
else<br />
category = 'Wikipedia indefinitely move-protected pages'<br />
end<br />
else<br />
category = 'Wikipedia pages with incorrect protection templates'<br />
end<br />
<br />
return string.format(<br />
'[[%s:%s|%s]]',<br />
mw.site.namespaces[14].name, -- "Category"<br />
category,<br />
title.text -- equivalent of {{PAGENAME}}<br />
)<br />
end<br />
<br />
return p</div>en>Mr. Stradivarius