跳转到内容

模組:Fullurl

本页使用了标题或全文手工转换
被永久保护的模块
维基百科,自由的百科全书

这是本页的一个历史版本,由SunAfterRain留言 | 贡献2019年8月10日 (六) 03:15 建立内容为“local fullurl = {} local args = pairs(mw.getCurrentFrame()):getParent().args function fullurl._fullurl(options) local title = args.title or args[1…”的新页面)编辑。这可能和当前版本存在着巨大的差异。

(差异) ←上一修订 | 最后版本 (差异) | 下一修订→ (差异)

local fullurl = {}
local args = pairs(mw.getCurrentFrame()):getParent().args

function fullurl._fullurl(options)
	local title = args.title or args[1] or tostring(mw.title.getCurrentTitle())
	local args = args.text or args[2] or title
	local action = ''
	local section = ''
	local summary = ''
	if args.action == '' then
		action = "action=" .. args.action
	end
    if args.section == '' then
		section = "&section=" .. args.section
	end
	if args.summary == '' then
		summary = "&summary=" .. args.summary
	end
    return tostring(mw.uri.fullUrl(title,action..section..summary))
end