มอดูล:IsValidPageName

จาก Roleplay Wiki
รุ่นแก้ไขเมื่อ 09:52, 13 กรกฎาคม 2557 โดย thwiki>^Nullzerobot (ปรับปรุงหน้าอัตโนมัติโดยบอต)
(ต่าง) ←รุ่นแก้ไขก่อนหน้า | รุ่นแก้ไขล่าสุด (ต่าง) | รุ่นแก้ไขถัดไป→ (ต่าง)
ไปยังการนำทาง ไปยังการค้นหา

เอกสารการใช้งานสำหรับมอดูลนี้อาจสร้างขึ้นที่ มอดูล:IsValidPageName/doc

-- This module implements [[แม่แบบ:isValidPageName]].

local export = {}

function export.isValidPageName(frame)
	local success, res = pcall(mw.title.new, frame.args[1])
	if success and res then
		return "valid"
	else
		return ""
	end
end

return export