Module:WikiProject banner/sandbox: Difference between revisions

Content deleted Content added
check redundant here too
why do we need to worry if category is empty, as long as it exists?
Line 322:
assessment_link = nil
end
local fallback_suffix = nil
 
-- if this is non-nil, this is the suffix which must be used with the class check_fallbacks returned
local fallback_suffix = nil
-- returns the most specific class for which the given category exists
-- FM is unusual: FM > File > NA
Line 338 ⟶ 337:
local category_exists = function(class, new_suffix_style)
local cat = mw.title.new(cfg.quality.assessment_category:format(class, category .. ' ' .. (new_suffix_style and 'pages' or 'articles')))
return cat.exists and #cat:getContent()>0 -- check if category exists and is not blank
end
local class_works = function(class)