Anonymous user
Module:Find sources: Difference between revisions
m
Changed protection settings for "Module:Find sources": re-raise, 1.5million transclusions and no edits from the EXCON editor ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
Richardpruen (talk | contribs) m (1 revision imported) |
imported>Primefac m (Changed protection settings for "Module:Find sources": re-raise, 1.5million transclusions and no edits from the EXCON editor ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
local ROOT_PAGE = 'Module:Find sources' | local ROOT_PAGE = 'Module:Find sources' | ||
local TEMPLATE_ROOT = ROOT_PAGE .. '/templates/' -- for template config modules | local TEMPLATE_ROOT = ROOT_PAGE .. '/templates/' -- for template config modules | ||
local | local LINK_CONFIG = ROOT_PAGE .. '/links' -- for link config modules | ||
local CONFIG_PAGE = ROOT_PAGE .. '/config' -- for global config | local CONFIG_PAGE = ROOT_PAGE .. '/config' -- for global config | ||
Line 45: | Line 45: | ||
-- Get link config. | -- Get link config. | ||
local | local links = maybeLoadData(LINK_CONFIG) | ||
local linkCfg = links[code] | |||
if not linkCfg then | if not linkCfg then | ||
error(string.format( | error(string.format( | ||
"invalid link code '%s'; no link config found at [[%s]]", | "invalid link code '%s'; no link config found at [[%s]]", | ||
code, | code, | ||
LINK_CONFIG | |||
)) | )) | ||
end | end |