Module:Icons: Difference between revisions

Icon: Fix issue with order of overrides
m (Icon: Fix issue when overrides amend displayed link text)
(Icon: Fix issue with order of overrides)
Line 397: Line 397:
local ovrTxt = txtOverrides[link]
local ovrTxt = txtOverrides[link]
local ovrLink = linkOverrides[link]
local ovrLink = linkOverrides[link]
local ovrTypeExt = typeExtOverrides[iconType]
if ovrTypeExt ~= nil then
ovrTypeExt = ovrTypeExt[img]
end
local ovrExt = extOverrides[img]
local ovrType = typeOverrides[iconType]
local hasText = (text ~= nil and text ~= '')
local hasText = (text ~= nil and text ~= '')
if ovrImg ~= nil and img == link then
if ovrImg ~= nil and img == link then
Line 412: Line 406:
end
end
end
end
-- Type & extension overrides must be after adjustments have been made
-- for any image overrides
local ovrTypeExt = typeExtOverrides[iconType]
if ovrTypeExt ~= nil then
ovrTypeExt = ovrTypeExt[img]
end
local ovrExt = extOverrides[img]
local ovrType = typeOverrides[iconType]
if not hasText and ovrTxt ~= nil then
if not hasText and ovrTxt ~= nil then
text = ovrTxt
text = ovrTxt