Module:Lua banner: Difference between revisions
Abhishek.it (talk | contribs) No edit summary Tag: Reverted |
Abhishek.it (talk | contribs) No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 52: | Line 52: | ||
boxArgs.type = 'notice' | boxArgs.type = 'notice' | ||
boxArgs.small = true | boxArgs.small = true | ||
boxArgs.image = '[[File:Lua-Logo. | boxArgs.image = '[[File:Lua-Logo.png|30px|alt=|link=]]' | ||
return mMessageBox.main('mbox', boxArgs) | return mMessageBox.main('mbox', boxArgs) | ||
end | end | ||
| Line 111: | Line 111: | ||
if module ~= "CP:libraryUtil" then | if module ~= "CP:libraryUtil" then | ||
local moduleTitle = mw.title.new(module) | local moduleTitle = mw.title.new(module) | ||
local | local moduleProt = moduleTitle and moduleTitle.protectionLevels["edit"][1] | ||
if moduleProt == nil then moduleProt = 0 else moduleProt = protLevels[moduleProt] end | |||
if moduleProt == nil then | |||
if moduleProt < currentProt then | if moduleProt < currentProt then | ||
cats[#cats + 1] = protCatName | cats[#cats + 1] = protCatName | ||
| Line 123: | Line 118: | ||
end | end | ||
end | end | ||
end | end | ||
end | end | ||