Content deleted Content added
return logic to current order |
+check_fallbacks |
||
Line 115:
elseif pagetype=='disambiguation page' then
out = resolveFQSgrade('disambig')
elseif
if pagetype=='set index article' then
out = 'List'
Line 332:
elseif assessment_link=='no' then
assessment_link = nil
end▼
local check_exists = function(class, assessment_cat) -- check if category exists and is not blank▼
local cat = mw.title.new('Category:' .. class .. '-Class' .. ' ' .. assessment_cat .. ' ' .. (article and 'articles' or 'pages'))▼
return (cat.exists and #cat:getContent()>0) and class or 'NA' -- automatically use NA for non-article pages if category does not exist▼
return class▼
end▼
end
local class = raw_args.class
Line 372 ⟶ 364:
class = p.class_mask(class, title, true, pagetype, article)
end
▲ local category_exists = function(class)
▲ return class
else -- check fallbacks for non-article classes
local new_class = class
end▼
local category_exists = function(class)
if class=='FM' and not category_exists('FM') then▼
▲ local cat = mw.title.new(
class = 'File' -- fall back to File-class if FM category does not exist▼
▲
▲ end
if not category_exists(class) then▼
▲ if class=='FM' and not category_exists('FM') then
▲
▲ end
return new_class
end
end
class = check_fallbacks(class, assessment_category)
local check_redundant = function()
if raw_args.class~='' and args.QUALITY_CRITERIA~='custom' then -- banner has a non-blank class value which is ignored
Line 604 ⟶ 603:
end
if yesno(args[tf_prefix..'QUALITY']) and class then
local tf_class =
add_category((tf_class=='' and 'Unassessed' or tf_class..'-Class') .. ' ' .. tf_assessment_cat .. ' ' .. (article and 'articles' or 'pages'))
end
|