Module:Find sources/sandbox: Difference between revisions

Content deleted Content added
m fixed reused local identifier
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 5:
local ROOT_PAGE = 'Module:Find sources'
local TEMPLATE_ROOT = ROOT_PAGE .. '/templates/' -- for template config modules
local LINK_ROOTLINK_CONFIG = ROOT_PAGE .. '/links/sandbox' -- for link config modules
local CONFIG_PAGE = ROOT_PAGE .. '/config' -- for global config
 
Line 45:
 
-- Get link config.
local linkCfglinks = maybeLoadData(LINK_ROOT .. codeLINK_CONFIG)
local linkCfg = links[code]
if not linkCfg then
error(string.format(
"invalid link code '%s'; no link config found at [[%s]]",
code,
LINK_CONFIG
LINK_ROOT .. code
))
end
Line 82 ⟶ 83:
 
-- Get the template config.
local templateCfgPage = TEMPLATE_ROOT .. template .. '/sandbox'
local templateCfg = maybeLoadData(templateCfgPage)
if not templateCfg then