Difference between revisions of "Module:Extension"
Jump to navigation
Jump to search
Add a function to check whether an extension is hosted in Gerrit, to be used by Template:Unmaintained extension
>Pppery (Adding logic to automatically add {{unmaintained extension}} to extension pages that have status=unmaintained but lack the template) |
>Pppery (Add a function to check whether an extension is hosted in Gerrit, to be used by Template:Unmaintained extension) |
||
Line 383: | Line 383: | ||
elseif content:find("{{[dD]eleted extension security warning") then | elseif content:find("{{[dD]eleted extension security warning") then | ||
return "<span style='display:none'>[[Template:Extension/vulnerabilities]]</span>" | return "<span style='display:none'>[[Template:Extension/vulnerabilities]]</span>" | ||
end | |||
end | |||
function p.isOnGerrit(frame) | |||
local title = mw.title.getCurrentTitle() | |||
if not title:inNamespace("Extension") then | |||
return "n/a" | |||
end | |||
local base = frame:expandTemplate{title="translatable"} | |||
local content = mw.title.new(base):getContent() | |||
if content:find("{{WikimediaDownload") or content:find("TNT|WikimediaDownload") or content:find("|repo%s*=") then | |||
return "yes" | |||
end | end | ||
end | end | ||
return p | return p |