Changes
use new cfg format
-- Set expiry
if args.expiry then
if configObj.cfg.indefStrings[args.expiry] then
self.expiry = 'indef'
elseif type(args.expiry) == 'number' then
do
self.bannerConfig = {}
local cfg = configObj.cfg
local configTables = {}
if cfg.banners[self.action] then
do
local namespace = titleObj.namespace
local categoryNamespaces = configObj.cfg.categoryNamespaceKeys
nskey = categoryNamespaces[namespace]
if not nskey and namespace % 2 == 1 then
local configOrder = {}
do
local reasonsWithNamespacePriority = configObj.cfg.reasonsWithNamespacePriority
local namespaceFirst = reason and reasonsWithNamespacePriority[reason] or false
for propertiesKey, t in pairs(properties) do
-- pos field in the property table.
--]]
local cats = configObj.cfg.protectionCategories
local cat
for i = 1, 2^noActive do
function Protection:makeExpiryCategory()
local reasonsWithoutExpiryCheck = self._configObj.cfg.reasonsWithoutExpiryCheck local expiryCheckActions = self._configObj.cfg.expiryCheckActions
local cat
function Blurb:_makeImageLinkParameter()
local imageLinks = self._configObj.cfg.imageLinks
local action = self._protectionObj.action
local level = self._protectionObj.level
function Blurb:_makePagetypeParameter()
local pagetypes = self._configObj.cfg.pagetypes
local namespace = self._titleObj.namespace
return pagetypes[namespace] or pagetypes.default or error('no default pagetype defined')
function Blurb:_makeProtectionBlurbParameter()
local protectionBlurbs = self._configObj.cfg.protectionBlurbs
local action = self._protectionObj.action
local level = self._protectionObj.level
function Blurb:_makeProtectionLevelParameter()
local protectionLevels = self._configObj.cfg.protectionLevels
local action = self._protectionObj.action
local level = self._protectionObj.level
-- Deal with regular protection types.
local images = self._configObj.cfg.images
if images[action] then
if images[action][level] then