Module:For
Jump to navigation
Jump to search
Documentation for this module may be created at Module:For/doc
local mArguments --initialize lazily
local mHatlist = require('Module:Hatnote list')
local mHatnote = require('Module:Hatnote')
local p = {}
--Implements {{For}} from the frame
--uses capitalized "For" to avoid collision with Lua reserved word "for"
function p.For (frame)
mArguments = require('Module:Arguments')
return p._For(mArguments.getArgs(frame))
end
--Implements {{For}} but takes a manual arguments table
function p._For (args)
local use = args[1] --cases with parameter 1 unspecified should probably be flagged
if use == 'other uses' then
use = use .. '[[Category:Hatnote templates using unusual parameters]]'
end
local pages = {}
function two (a, b, c) return a, b, 1 end --lets us run ipairs from 2
for k, v in two(ipairs(args)) do table.insert(pages, v) end
return mHatnote._hatnote(
mHatlist.forSeeTableToString({{use = use, pages = pages}}),
{selfref = args.selfref}
)
end
return p
Debug data:
[SQLBagOStuff] MainObjectStash using store ReplicatedBagOStuff[objectcache] MainWANObjectCache using store EmptyBagOStuffIP: 216.73.216.43Start request GET /mediawiki/index.php?oldid=214&title=Module%3AFor
HTTP HEADERS:
CONTENT-TYPE:
CONTENT-LENGTH: 0
USER-AGENT: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HOST: zero-k.info
COOKIE: wikidb229_mw__session=khk0mrmrfjkcrlaknvml17jb1nob2btk
ACCEPT-ENCODING: gzip, br, zstd, deflate
ACCEPT: */*
CONNECTION: close[localisation] LocalisationCache: using store LCStoreDB[session] SessionManager using store SqlBagOStuff[session] Session "khk0mrmrfjkcrlaknvml17jb1nob2btk" requested without UserID cookie[DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: request info {
"IPAddress": "216.73.216.43",
"UserAgent": "Mozilla\/5.0 AppleWebKit\/537.36 (KHTML, like Gecko; compatible; ClaudeBot\/1.0; +claudebot@anthropic.com)",
"ChronologyProtection": false,
"ChronologyPositionIndex": 0,
"ChronologyClientId": false
}[DBConnection] Wikimedia\Rdbms\LoadBalancer::lazyLoadReplicationPositions: executed chronology callback.[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.Title::getRestrictionTypes: applicable restrictions to [[Module:For]] are {edit,move}[ContentHandler] Created handler for Scribunto: ScribuntoContentHandler[MessageCache] MessageCache using store SqlBagOStuff[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff[SQLBagOStuff] SqlBagOStuff::lock failed due to timeout for wikidb229-mw_:messages:en.[ContentHandler] Created handler for wikitext: WikitextContentHandler[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuff[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from databaseParserFactory: using preprocessor: Preprocessor_HashUnstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct[caches] parser: SqlBagOStuffArticle::view using parser cache: noArticle::view: doing uncached parse[SQLBagOStuff] Connection mysql object #126 (handle id #120) will be used for SqlBagOStuffUnstubbing $wgParser on call of $wgParser::parse from AbstractContent->getParserOutput[Scribunto] Scribunto_LuaStandaloneInterpreter::__construct: creating interpreter: ""C:\Projekty\zero-k.info\www\mediawiki\extensions\Scribunto\includes\engines\LuaStandalone/binaries/lua5_1_5_Win64_bin/lua5.1.exe" "C:\Projekty\zero-k.info\www\mediawiki\extensions\Scribunto\includes\engines\LuaStandalone/mw_main.lua" "C:\Projekty\zero-k.info\www\mediawiki\extensions\Scribunto\includes" "0" "8""[gitinfo] Candidate cacheFile=C:\Projekty\zero-k.info\www\mediawiki/gitinfo.json for C:\Projekty\zero-k.info\www\mediawiki[gitinfo] Cache incomplete for C:\Projekty\zero-k.info\www\mediawikiSiteStats::loadAndLazyInit: reading site_stats from replica DBMediaWiki::preOutputCommit: primary transaction round committedMediaWiki::preOutputCommit: pre-send deferred updates completedMediaWiki::preOutputCommit: session changes committedMediaWiki::preOutputCommit: LBFactory shutdown completedTitle::getRestrictionTypes: applicable restrictions to [[Module:For]] are {edit,move}