Difference between revisions of "Module:Extension"
Add maintenance categories for MediaWiki version.
>Samwilson (Add getMediaWikiRequirement() function.) |
>Samwilson (Add maintenance categories for MediaWiki version.) |
||
Line 302: | Line 302: | ||
-- If the first arg is given, it'll be the manual override value. | -- If the first arg is given, it'll be the manual override value. | ||
if frame.args[1] ~= nil and mw.text.trim( frame.args[1] ) ~= "" then | if frame.args[1] ~= nil and mw.text.trim( frame.args[1] ) ~= "" then | ||
return frame.args[1] | return frame.args[1] .. '[[Category:Extensions with manual MediaWiki version]]' | ||
end | end | ||
-- Otherwise, look it up from extension.json. | -- Otherwise, look it up from extension.json. | ||
Line 309: | Line 309: | ||
return data.requires.MediaWiki | return data.requires.MediaWiki | ||
end | end | ||
-- If neither are given, | -- If neither are given, just categorize. | ||
return '' | return '[[Category:Extensions without MediaWiki version]]' | ||
end | end | ||