ผลต่างระหว่างรุ่นของ "มอดูล:Documentation"

เนื้อหาที่ลบ เนื้อหาที่เพิ่ม
สร้างหน้าด้วย "-- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs local messageBox = require('Module:Message box') -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local..."
 
ไม่มีความย่อการแก้ไข
บรรทัดที่ 402:
-- 'protection-template' --> 'pp-template'
-- 'protection-template-args' --> {docusage = 'yes'}
local protectionLevels, mProtectionBanner
local title = env.title
local protectionLevels, mProtectionBanner
local protectionTemplate = message('protection-template')
local namespace = title.namespace
if not (protectionTemplate and (namespace == 10 or namespace == 828)) then
-- Don't display the protection template if we are not in the template or module namespaces.
return nil
end
protectionLevels = env.protectionLevels
if not protectionLevels then
return nil
end
local editProteditLevels = protectionLevels.edit and protectionLevels.edit[1]
local moveProtmoveLevels = protectionLevels.move and protectionLevels.move[1]
if moveLevels and moveLevels[1] == 'sysop' or editLevels and editLevels[1] then
if editProt then
-- The page is editfull-move protected, or full, template, or semi-protected.
local frame = mw.getCurrentFrame()
mProtectionBanner = require('Module:Protection banner')
localreturn reasonframe:expandTemplate{title = protectionTemplate, args = message('protection-reasontemplate-editargs', nil, 'table')}
return mProtectionBanner._main{reason, small = true}
elseif moveProt and moveProt ~= 'autoconfirmed' then
-- The page is move-protected but not edit-protected. Exclude move
-- protection with the level "autoconfirmed", as this is equivalent to
-- no move protection at all.
mProtectionBanner = require('Module:Protection banner')
return mProtectionBanner._main{action = 'move', small = true}
else
return nil