http://ml.sayahna.org/index.php?title=Module:Namespace_detect/data&feed=atom&action=history
Module:Namespace detect/data - Revision history
2024-03-28T18:06:06Z
Revision history for this page on the wiki
MediaWiki 1.31.5
http://ml.sayahna.org/index.php?title=Module:Namespace_detect/data&diff=6059&oldid=prev
Admin: 1 revision
2014-04-07T07:14:03Z
<p>1 revision</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">Revision as of 07:14, 7 April 2014</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Admin
http://ml.sayahna.org/index.php?title=Module:Namespace_detect/data&diff=6058&oldid=prev
Mr. Stradivarius: bug fix - use the demospace parameter as both key and value in the argKeys table
2014-04-05T17:02:16Z
<p>bug fix - use the demospace parameter as both key and value in the argKeys table</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 17:02, 5 April 2014</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l18" >Line 18:</td>
<td colspan="2" class="diff-lineno">Line 18:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- values can be added as a string, or as an array of strings.</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- values can be added as a string, or as an array of strings.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>local <del class="diffchange diffchange-inline">argKeys </del>= {</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>local <ins class="diffchange diffchange-inline">defaultKeys </ins>= {</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del class="diffchange diffchange-inline">main = {</del>'main'<del class="diffchange diffchange-inline">}</del>,</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 'main',</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del class="diffchange diffchange-inline">talk = {</del>'talk'<del class="diffchange diffchange-inline">}</del>,</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 'talk',</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del class="diffchange diffchange-inline">other = {</del>'other'<del class="diffchange diffchange-inline">}</del>,</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 'other',</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del class="diffchange diffchange-inline">subjectns = {</del>'subjectns'<del class="diffchange diffchange-inline">}</del>,</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 'subjectns',</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del class="diffchange diffchange-inline">demospace = {</del>'demospace'<del class="diffchange diffchange-inline">}</del>,</div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> 'demospace',</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> <del class="diffchange diffchange-inline">page = {</del>'<del class="diffchange diffchange-inline">page</del>'<del class="diffchange diffchange-inline">}</del></div></td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> '<ins class="diffchange diffchange-inline">demopage</ins>'</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">local argKeys = {}</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">for i, defaultKey in ipairs(defaultKeys) do</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"> argKeys[defaultKey] = {defaultKey}</ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">end</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>for defaultKey, t in pairs(argKeys) do</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>for defaultKey, t in pairs(argKeys) do</div></td></tr>
</table>
Mr. Stradivarius
http://ml.sayahna.org/index.php?title=Module:Namespace_detect/data&diff=5459&oldid=prev
Admin: 1 revision
2014-03-27T06:48:48Z
<p>1 revision</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">Revision as of 06:48, 27 March 2014</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>
Admin
http://ml.sayahna.org/index.php?title=Module:Namespace_detect/data&diff=5458&oldid=prev
Mr. Stradivarius: Protected Module:Namespace detect/data: High-risk Lua module ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
2014-03-24T11:45:45Z
<p>Protected Module:Namespace detect/data: <a href="http://en.wikipedia.org/wiki/Lua/Modules" class="extiw" title="wikipedia:Lua/Modules">High-risk Lua module</a> ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))</p>
<p><b>New page</b></p><div>--------------------------------------------------------------------------------<br />
-- Namespace detect data --<br />
-- This module holds data for [[Module:Namespace detect]] to be loaded per --<br />
-- page, rather than per #invoke, for performance reasons. --<br />
--------------------------------------------------------------------------------<br />
<br />
local cfg = require('Module:Namespace detect/config')<br />
<br />
local function addKey(t, key, defaultKey)<br />
if key ~= defaultKey then<br />
t[#t + 1] = key<br />
end<br />
end<br />
<br />
-- Get a table of parameters to query for each default parameter name.<br />
-- This allows wikis to customise parameter names in the cfg table while<br />
-- ensuring that default parameter names will always work. The cfg table<br />
-- values can be added as a string, or as an array of strings.<br />
<br />
local argKeys = {<br />
main = {'main'},<br />
talk = {'talk'},<br />
other = {'other'},<br />
subjectns = {'subjectns'},<br />
demospace = {'demospace'},<br />
page = {'page'}<br />
}<br />
<br />
for defaultKey, t in pairs(argKeys) do<br />
local cfgValue = cfg[defaultKey]<br />
local cfgValueType = type(cfgValue)<br />
if cfgValueType == 'string' then<br />
addKey(t, cfgValue, defaultKey)<br />
elseif cfgValueType == 'table' then<br />
for i, key in ipairs(cfgValue) do<br />
addKey(t, key, defaultKey)<br />
end<br />
end<br />
cfg[defaultKey] = nil -- Free the cfg value as we don't need it any more.<br />
end<br />
<br />
local function getParamMappings()<br />
--[[<br />
-- Returns a table of how parameter names map to namespace names. The keys<br />
-- are the actual namespace names, in lower case, and the values are the<br />
-- possible parameter names for that namespace, also in lower case. The<br />
-- table entries are structured like this:<br />
-- {<br />
-- [''] = {'main'},<br />
-- ['wikipedia'] = {'wikipedia', 'project', 'wp'},<br />
-- ...<br />
-- }<br />
--]]<br />
local mappings = {}<br />
local mainNsName = mw.site.subjectNamespaces[0].name<br />
mainNsName = mw.ustring.lower(mainNsName)<br />
mappings[mainNsName] = mw.clone(argKeys.main)<br />
mappings['talk'] = mw.clone(argKeys.talk)<br />
for nsid, ns in pairs(mw.site.subjectNamespaces) do<br />
if nsid ~= 0 then -- Exclude main namespace.<br />
local nsname = mw.ustring.lower(ns.name)<br />
local canonicalName = mw.ustring.lower(ns.canonicalName)<br />
mappings[nsname] = {nsname}<br />
if canonicalName ~= nsname then<br />
table.insert(mappings[nsname], canonicalName)<br />
end<br />
for _, alias in ipairs(ns.aliases) do<br />
table.insert(mappings[nsname], mw.ustring.lower(alias))<br />
end<br />
end<br />
end<br />
return mappings<br />
end<br />
<br />
return {<br />
argKeys = argKeys,<br />
cfg = cfg,<br />
mappings = getParamMappings()<br />
}</div>
Mr. Stradivarius