وحدة:ProtectionLevels
من أرابيكا، الموسوعة العربية الحرة
المزيد من اللغات
المزيد من الإجراءات
التقييم إما غير صالح أو غير محدد. يرجى إزالة قالب {{تقييم وحدة}} أو تحديد تقييم صالح. |
الاستخدام
لمعرفة إذا كانت صفحة أو قالب يخضع لحماية أم لا :
{{#استدعاء:ProtectionLevels|main}}
أمثلة
| توصيف | يظهر |
|---|---|
<code>{{#invoke:ProtectionLevels|main}}</code>
|
|
<code>{{#invoke:ProtectionLevels|main|قالب:في الأخبار}}</code>
|
|
{{#invoke:ProtectionLevels|main|وحدة:wikidata2}}
|
|
{{#invoke:ProtectionLevels|main|أرابيكا:ملعب}}
|
|
{{#invoke:ProtectionLevels|main|شسيشسي}}
|
|
--[[
{{#invoke:ProtectionLevels|main}}
{{#invoke:ProtectionLevels|main|الصفحة_الرئيسية}}
--]]
local p = {}
function p.main(frame)
local page
local titleArg = frame.args[1] or frame:getParent().args[1]
if titleArg then
page = mw.title.new(titleArg)
else
page = mw.title.getCurrentTitle()
end
--mw.log( "p.main(frame) :page " .. page.prefixedText )
--mw.log( mw.dumpObject(page.protectionLevels) )
local editProt = page.protectionLevels.edit and page.protectionLevels.edit[1]
local moveProt = page.protectionLevels.move and page.protectionLevels.move[1]
if editProt then
return "1"
end
return ""
end
return p