跳转到内容

模組:Delete2

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

这是本页的一个历史版本,由SunAfterRain留言 | 贡献2020年1月31日 (五) 10:28 建立内容为“local data = require('Module:Template:Delete/data') local yesno = require('Module:Yesno') local z = {} function input2( frame, name, reason )…”的新頁面)编辑。这可能和当前版本存在着巨大的差异。

(差异) ←上一修订 | 最后版本 (差异) | 下一修订→ (差异)
local data = require('Module:Template:Delete/data')
local yesno = require('Module:Yesno')

local z = {}

function input2( frame, name, reason )
    name = mw.text.trim( name ):upper()
    wt = {}
    for i, item in ipairs( data ) do
    	local reasontext = ''
    	if yesno(reason) == 1 then
    		reasontext = ':' .. item['criteria']
    	end
        return '[[WP:CSD#' .. item['code'] .. '|' .. item['code'] .. ']]' .. reason
    end
end

function z.input2(frame)
	return input2(frame, frame.args[1], frame.args[1])
end

return z