Module:Message box: Difference between revisions
control for blank values of issue, fix, and subst
m>Mr. Stradivarius (switch indentation to tabs) |
m>Mr. Stradivarius (control for blank values of issue, fix, and subst) |
||
Line 176: | Line 176: | ||
-- Find whether we are using a small message box. | -- Find whether we are using a small message box. | ||
if cfg.allowSmall and ( | if cfg.allowSmall and ( | ||
cfg.smallParam and args.small == cfg.smallParam | |||
or not cfg.smallParam and yesno(args.small) | |||
) | |||
then | then | ||
self.isSmall = true | self.isSmall = true | ||
Line 221: | Line 221: | ||
end | end | ||
local issue = args.issue | local issue = args.issue | ||
issue = type(issue) == 'string' and issue or nil | issue = type(issue) == 'string' and issue ~= '' and issue or nil | ||
local text = args.text | local text = args.text | ||
text = type(text) == 'string' and text or nil | text = type(text) == 'string' and text or nil | ||
Line 259: | Line 259: | ||
-- Get other values. | -- Get other values. | ||
self.fix = args.fix | self.fix = args.fix ~= '' and args.fix or nil | ||
local date | local date | ||
if args.date and args.date ~= '' then | if args.date and args.date ~= '' then |