Difference between revisions of "Module:Extension"

322 bytes added ,  05:39, 5 February 2021
add getMinimumMWVersion
>Pppery
(Fix comments)
>DannyS712
(add getMinimumMWVersion)
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 294: Line 293:
     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