Difference between revisions of "Module:Extension"
Jump to navigation
Jump to search
Sync from sandbox
>Pppery (Syncing from sandbox: get more data (incl. hooks) from extension.json if not specified in template) |
>Pppery (Sync from sandbox) |
||
Line 356: | Line 356: | ||
end | end | ||
return out | return out | ||
end | |||
function p.maintenanceLinks(frame) | |||
local base = frame:expandTemplate{title="translatable"} | |||
if base == mw.title.getCurrentTitle().prefixedText then | |||
return | |||
end | |||
local out = "" | |||
local content = mw.title.new(base):getContent() | |||
-- Check if the source page was deleted or not | |||
if content:find("{{[aA]rchived ?[Ee]xtension") or content:find("{{TNT|[Aa]rchived ?[Ee]xtension") then | |||
return "<span style='display:none'>[[Template:Extension/archived]]</span>" | |||
--Check if the source page was archived or not | |||
elseif content:find("{{[dD]eleted extension security warning") then | |||
return "<span style='display:none'>[[Template:Extension/vulnerabilities]]</span>" | |||
end | |||
end | end | ||
return p | return p |