Module:Infobox MOS: Difference between revisions
m Removed extra newlines |
Fixed logic for debug categories, removed tuning categories |
||
| Line 7: | Line 7: | ||
local xp = require('Module:Xenpaper') | local xp = require('Module:Xenpaper') | ||
local infobox = require('Module:Infobox') | local infobox = require('Module:Infobox') | ||
local common_suffix = { | local common_suffix = { | ||
| Line 57: | Line 55: | ||
-- Add tuning category | -- Add tuning category | ||
categories = categories .. string.format('[[Category:%s]]', tuning) | --categories = categories .. string.format('[[Category:%s]]', tuning) | ||
-- Add notecount category if the notecount is greater than 3 | -- Add notecount category if the notecount is greater than 3 | ||
| Line 289: | Line 287: | ||
local tuning = frame.args['Tuning'] | local tuning = frame.args['Tuning'] | ||
local other_names = frame.args['Other names'] or nil | local other_names = frame.args['Other names'] or nil | ||
local debug_mode = frame.args['debug'] | local debug_mode = tonumber(frame.args['debug']) == 1 | ||
local result = p._infobox_MOS(tuning, other_names) | local result = p._infobox_MOS(tuning, other_names) | ||
if not debug_mode then | |||
result = result .. p.categorize(tuning) | |||
end | |||
return result | return result | ||