Editing Message box
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 5: | Line 5: | ||
require('Module:No globals') | require('Module:No globals') | ||
local getArgs | local getArgs | ||
+ | local categoryHandler = require('Module:Category handler')._main | ||
local yesno = require('Module:Yesno') | local yesno = require('Module:Yesno') | ||
Line 108: | Line 109: | ||
obj.categories = {} | obj.categories = {} | ||
obj.classes = {} | obj.classes = {} | ||
− | |||
− | |||
return setmetatable(obj, MessageBox) | return setmetatable(obj, MessageBox) | ||
Line 123: | Line 122: | ||
cat = string.format('[[Category:%s]]', cat) | cat = string.format('[[Category:%s]]', cat) | ||
end | end | ||
− | |||
self.categories[ns] = self.categories[ns] or {} | self.categories[ns] = self.categories[ns] or {} | ||
table.insert(self.categories[ns], cat) | table.insert(self.categories[ns], cat) | ||
Line 431: | Line 429: | ||
function MessageBox:renderCategories() | function MessageBox:renderCategories() | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
-- Convert category tables to strings and pass them through | -- Convert category tables to strings and pass them through | ||
-- [[Module:Category handler]]. | -- [[Module:Category handler]]. | ||
− | return | + | return categoryHandler{ |
main = table.concat(self.categories[0] or {}), | main = table.concat(self.categories[0] or {}), | ||
template = table.concat(self.categories[10] or {}), | template = table.concat(self.categories[10] or {}), |