Difference between revisions of "Module:Extension"

Jump to navigation Jump to search
322 bytes removed ,  02:29, 8 February 2021
Undo revision 4389935 by DannyS712 (talk): this isn’t going to work: extension.json is read only for the master branch, but the extension may support older versions on other branches
>DannyS712
(add getMinimumMWVersion)
>Tacsipacsi
(Undo revision 4389935 by DannyS712 (talk): this isn’t going to work: extension.json is read only for the master branch, but the extension may support older versions on other branches)
Line 284: Line 284:


function p.getVersion( frame )
function p.getVersion( frame )
     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]
Line 293: Line 294:
     return ''
     return ''
end
end
function p.getMinimumMWVersion( frame )
    if frame.args[1] ~= nil and mw.text.trim(frame.args[1]) ~= "" then
    return frame.args[1]
    end
    local data = getExtData()
    if data ~= nil and data.requires ~= nil and data.requires.MediaWiki ~= nill then
    return data.requires.MediaWiki
    end
    return ''
end
function p.getHooks(frame)
function p.getHooks(frame)
local hookOutput = frame.args.header
local hookOutput = frame.args.header
Anonymous user

Navigation menu