跳转到内容

模組:Delete2

被永久保护的模块
维基百科,自由的百科全书

这是本页的一个历史版本,由SunAfterRain留言 | 贡献2020年1月31日 (五) 11:06编辑。这可能和当前版本存在着巨大的差异。

local data = require('Module:Template:Delete/data')
local yesno = require('Module:Yesno')

local z = {}

function z.input2(frame)
	local args = frame.args
	map = {}
    arg = args[1]
    if arg and map[mw.text.trim(arg:lower())] then
        item = data[map[mw.text.trim(arg:lower())]]
        if yesno(args.reason) == 0 then
            return '[[WP:CSD#' .. item['code'] .. '|' .. item['code'] .. ']]'
        else
           	return '[[WP:CSD#' .. item['code'] .. '|' .. item['code'] .. ']]:' .. item['criteria']
        end
    end
end

return z