Modul:Protection banner: Unterschied zwischen den Versionen
now level
(try to merge the edit conflict, one variable at a time, starting with action) |
(now level) |
||
Zeile 47: | Zeile 47: | ||
level = '*' | level = '*' | ||
end | end | ||
self. | self.level = level or '*' | ||
end | end | ||
Zeile 106: | Zeile 106: | ||
end | end | ||
if cfg.defaultBanners[self.action] then | if cfg.defaultBanners[self.action] then | ||
configTables[#configTables + 1] = cfg.defaultBanners[self.action][self. | configTables[#configTables + 1] = cfg.defaultBanners[self.action][self.level] | ||
configTables[#configTables + 1] = cfg.defaultBanners[self.action].default | configTables[#configTables + 1] = cfg.defaultBanners[self.action].default | ||
end | end | ||
Zeile 122: | Zeile 122: | ||
function Protection:isProtected() | function Protection:isProtected() | ||
return self. | return self.level ~= '*' | ||
end | end | ||
Zeile 268: | Zeile 268: | ||
local mEditRequest = require('Module:Submit an edit request') | local mEditRequest = require('Module:Submit an edit request') | ||
local action = self._protectionObj.action | local action = self._protectionObj.action | ||
local level = self._protectionObj | local level = self._protectionObj.level | ||
-- Get the display message key. | -- Get the display message key. | ||
Zeile 307: | Zeile 307: | ||
function Blurb:_makeExplanationBlurbParameter() | function Blurb:_makeExplanationBlurbParameter() | ||
local action = self._protectionObj.action | local action = self._protectionObj.action | ||
local level = self._protectionObj | local level = self._protectionObj.level | ||
local namespace = self._titleObj.namespace | local namespace = self._titleObj.namespace | ||
local isTalk = self._titleObj.isTalkPage | local isTalk = self._titleObj.isTalkPage | ||
Zeile 340: | Zeile 340: | ||
local imageLinks = self._configObj.cfg.imageLinks | local imageLinks = self._configObj.cfg.imageLinks | ||
local action = self._protectionObj.action | local action = self._protectionObj.action | ||
local level = self._protectionObj | local level = self._protectionObj.level | ||
local msg | local msg | ||
if imageLinks[action][level] then | if imageLinks[action][level] then | ||
Zeile 379: | Zeile 379: | ||
local protectionBlurbs = self._configObj.cfg.protectionBlurbs | local protectionBlurbs = self._configObj.cfg.protectionBlurbs | ||
local action = self._protectionObj.action | local action = self._protectionObj.action | ||
local level = self._protectionObj | local level = self._protectionObj.level | ||
local msg | local msg | ||
if protectionBlurbs[action][level] then | if protectionBlurbs[action][level] then | ||
Zeile 405: | Zeile 405: | ||
local protectionLevels = self._configObj.cfg.protectionLevels | local protectionLevels = self._configObj.cfg.protectionLevels | ||
local action = self._protectionObj.action | local action = self._protectionObj.action | ||
local level = self._protectionObj | local level = self._protectionObj.level | ||
local msg | local msg | ||
if protectionLevels[action][level] then | if protectionLevels[action][level] then | ||
Zeile 534: | Zeile 534: | ||
local action = protectionObj.action | local action = protectionObj.action | ||
local level = protectionObj | local level = protectionObj.level | ||
local expiry = protectionObj:getExpiry() | local expiry = protectionObj:getExpiry() | ||
local namespace = titleObj.namespace | local namespace = titleObj.namespace | ||
Zeile 730: | Zeile 730: | ||
local reason = protectionObj:getReason() | local reason = protectionObj:getReason() | ||
local action = protectionObj.action | local action = protectionObj.action | ||
local level = protectionObj | local level = protectionObj.level | ||
--[[ | --[[ | ||
Zeile 892: | Zeile 892: | ||
local expiry = protectionObj:getExpiry() | local expiry = protectionObj:getExpiry() | ||
local action = protectionObj.action | local action = protectionObj.action | ||
local level = protectionObj | local level = protectionObj.level | ||
if not protectionObj:isProtected() | if not protectionObj:isProtected() | ||
Zeile 919: | Zeile 919: | ||
local action = protectionObj.action | local action = protectionObj.action | ||
local level = protectionObj | local level = protectionObj.level | ||
local namespace = titleObj.namespace | local namespace = titleObj.namespace | ||