"मोड्युल:Article history" का संशोधनहरू बिचको अन्तर

Content deleted Content added
Undid revision 646877312 by Mr. Stradivarius (talk) - causing problems
categorise all talk pages, but not user talk or draft talk
पङ्क्ति १,१२४:
end
return ret
end
 
function ArticleHistory:categoriesAreActive()
-- Returns a boolean indicating whether categories should be output or not.
local title = self.currentTitle
local ns = title.namespace
return title.isTalkPage
and ns ~= 3 -- not user talk
and ns ~= 119 -- not draft talk
end
 
Line १,१२९ ⟶ १,१३८:
local ret = {}
 
if self:categoriesAreActive() then
-- Child object categories
for i, obj in ipairs(self:getAllObjects()) do
local categories = self:try(obj.getCategories, obj, self)
for j, categoryObj in ipairs(categories or {}) do
ret[#ret + 1] = tostring(categoryObj)
end
end
end
-- Extra categories
 
for i, func in ipairs(self.cfg.extraCategories or {}) do
-- Extra categories
for local i,cats = func in ipairs(self.cfg.extraCategories) or {}) do
for i, categoryObj in ipairs(cats) do
local cats = func(self) or {}
ret[#ret + 1] = tostring(categoryObj)
for i, categoryObj in ipairs(cats) do
end
ret[#ret + 1] = tostring(categoryObj)
end
end
Line १,३३४ ⟶ १,३४५:
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