Module:Protection banner: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(some cleanup) |
(use new cfg format) |
||
Line 98:
-- Set expiry
if args.expiry then
if configObj
self.expiry = 'indef'
elseif type(args.expiry) == 'number' then
Line 121:
do
self.bannerConfig = {}
local cfg = configObj
local configTables = {}
if cfg.banners[self.action] then
Line 167:
do
local namespace = titleObj.namespace
local categoryNamespaces = configObj
nskey = categoryNamespaces[namespace]
if not nskey and namespace % 2 == 1 then
Line 202:
local configOrder = {}
do
local reasonsWithNamespacePriority = configObj
local namespaceFirst = reason and reasonsWithNamespacePriority[reason] or false
for propertiesKey, t in pairs(properties) do
Line 271:
-- pos field in the property table.
--]]
local cats = configObj
local cat
for i = 1, 2^noActive do
Line 300:
function Protection:makeExpiryCategory()
local reasonsWithoutExpiryCheck = self._configObj
local expiryCheckActions = self._configObj
local cat
Line 554:
function Blurb:_makeImageLinkParameter()
local imageLinks = self._configObj
local action = self._protectionObj.action
local level = self._protectionObj.level
Line 587:
function Blurb:_makePagetypeParameter()
local pagetypes = self._configObj
local namespace = self._titleObj.namespace
return pagetypes[namespace] or pagetypes.default or error('no default pagetype defined')
Line 593:
function Blurb:_makeProtectionBlurbParameter()
local protectionBlurbs = self._configObj
local action = self._protectionObj.action
local level = self._protectionObj.level
Line 619:
function Blurb:_makeProtectionLevelParameter()
local protectionLevels = self._configObj
local action = self._protectionObj.action
local level = self._protectionObj.level
Line 767:
-- Deal with regular protection types.
local images = self._configObj
if images[action] then
if images[action][level] then
|