https://wiki.myriadrf.org/index.php?title=Module:Category_handler/shared&feed=atom&action=history
Module:Category handler/shared - Revision history
2024-03-28T14:18:18Z
Revision history for this page on the wiki
MediaWiki 1.40.1
https://wiki.myriadrf.org/index.php?title=Module:Category_handler/shared&diff=262&oldid=prev
AndrewBack: 1 revision
2015-08-19T12:02:24Z
<p>1 revision</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 12:02, 19 August 2015</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
AndrewBack
https://wiki.myriadrf.org/index.php?title=Module:Category_handler/shared&diff=261&oldid=prev
*>Mr. Stradivarius: Protected Module:Category handler/shared: High-risk Lua module ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))
2014-07-13T09:06:15Z
<p>Protected Module:Category handler/shared: <a href="/index.php?title=WP:High-risk_templates&action=edit&redlink=1" class="new" title="WP:High-risk templates (page does not exist)">High-risk Lua module</a> ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))</p>
<p><b>New page</b></p><div>-- This module contains shared functions used by [[Module:Category handler]]<br />
-- and its submodules.<br />
<br />
local p = {}<br />
<br />
function p.matchesBlacklist(page, blacklist)<br />
for i, pattern in ipairs(blacklist) do<br />
local match = mw.ustring.match(page, pattern)<br />
if match then<br />
return true<br />
end<br />
end<br />
return false<br />
end<br />
<br />
function p.getParamMappings(useLoadData)<br />
local dataPage = 'Module:Namespace detect/data'<br />
if useLoadData then<br />
return mw.loadData(dataPage).mappings<br />
else<br />
return require(dataPage).mappings<br />
end<br />
end<br />
<br />
function p.getNamespaceParameters(titleObj, mappings)<br />
-- We don't use title.nsText for the namespace name because it adds<br />
-- underscores.<br />
local mappingsKey<br />
if titleObj.isTalkPage then<br />
mappingsKey = 'talk'<br />
else<br />
mappingsKey = mw.site.namespaces[titleObj.namespace].name<br />
end<br />
mappingsKey = mw.ustring.lower(mappingsKey)<br />
return mappings[mappingsKey] or {}<br />
end<br />
<br />
return p</div>
*>Mr. Stradivarius