Module:Archive list alpha and Module:Archive list alpha/sandbox: Difference between pages
(Difference between pages)
imported>MusikBot II m Protected "Module:Archive list alpha": High-risk template or module: 930 transclusions (more info) ([Edit=Require autoconfirmed or confirmed access] (indefinite)) |
imported>Lemondoge Logic simplifications |
||
| Line 42: | Line 42: | ||
-- that the page doesn't exist. | -- that the page doesn't exist. | ||
return false | return false | ||
elseif titleObject then | |||
return titleObject.exists | |||
else | else | ||
return false -- Return false if given a bad title. | |||
end | end | ||
end | end | ||
| Line 129: | Line 127: | ||
lineNum = math.huge | lineNum = math.huge | ||
end | end | ||
elseif isLong==true then | |||
lineNum = 3 -- Default to 3 links on long | |||
else | else | ||
lineNum = 10 -- Default to 10 on short | |||
end | end | ||
return lineNum | return lineNum | ||
| Line 156: | Line 152: | ||
ret = 'Archive ' | ret = 'Archive ' | ||
end | end | ||
elseif type(prefix) == 'string' then --type is not long | |||
ret = prefix | |||
if space == 'yes' then | |||
ret = ret .. ' ' | |||
end | |||
end | end | ||
return ret | return ret | ||
| Line 170: | Line 164: | ||
local function getStart( start ) | local function getStart( start ) | ||
start = processNumArg( start ) | start = processNumArg( start ) | ||
return start or 1 | |||
end | end | ||
| Line 278: | Line 268: | ||
-- Determine if format should be long | -- Determine if format should be long | ||
local function findFormType( auto ) | local function findFormType( auto ) | ||
return auto == 'long' | |||
end | end | ||