Difference between revisions of "Module:Lua banner"
Jump to navigation
Jump to search
Fix `wish` parameter
>ExE Boss (Add `wish` parameter) |
>ExE Boss (Fix `wish` parameter) |
||
Line 40: | Line 40: | ||
if #modules < 1 then | if #modules < 1 then | ||
cfg = cfg or getConfig() | cfg = cfg or getConfig() | ||
if cfg['allow_wishes'] or yesno(args.wish) then | if cfg['allow_wishes'] or yesno(args and args.wish) then | ||
boxArgs.text = format('wishtext') | boxArgs.text = format('wishtext') | ||
else | else | ||
Line 73: | Line 73: | ||
-- Error category | -- Error category | ||
if #modules < 1 and not cfg['allow_wishes'] and cfg['error_category'] then | if #modules < 1 and not (cfg['allow_wishes'] or yesno(args.wish)) and cfg['error_category'] then | ||
cats[#cats + 1] = cfg['error_category'] | cats[#cats + 1] = cfg['error_category'] | ||
end | end | ||
Line 87: | Line 87: | ||
category = pagename and cfg['module_categories'][pagename.text] | category = pagename and cfg['module_categories'][pagename.text] | ||
if not category then | if not category then | ||
if cfg['allow_wishes'] and #modules < 1 then | if (cfg['allow_wishes'] or yesno(args.wish)) and #modules < 1 then | ||
category = cfg['wish_category'] | category = cfg['wish_category'] | ||
else | else |