Content deleted Content added
don't require status object config to have a "text" field |
only output categories if we are in the Talk namespace |
||
Line 1,124:
end
return ret
end
function ArticleHistory:categoriesAreActive()
-- Returns a boolean indicating whether categories should be output or not.
return self.currentTitle.namespace == 1 -- We are in the Talk namespace
end
Line 1,129 ⟶ 1,134:
local ret = {}
if self:categoriesAreActive() then
local categories = self:try(obj.getCategories, obj, self)
for j, categoryObj in ipairs(categories or {}) do
ret[#ret + 1] = tostring(categoryObj)
end
end
for i, func in ipairs(self.cfg.extraCategories or {}) do
▲ -- Extra categories
for i, categoryObj in ipairs(cats) do▼
ret[#ret + 1] = tostring(categoryObj)▼
▲ for i, categoryObj in ipairs(cats) do
end
▲ ret[#ret + 1] = tostring(categoryObj)
end
end
Line 1,334 ⟶ 1,341:
errorList:tag('li'):wikitext(msg)
end
if self:categoriesAreActive() then
errorCategory = tostring(Category.new(self:message( 'error-category' ))) end
-- If there are no errors and no active objects, then exit. We can't make
|