Content deleted Content added
move parameter check to function |
pass project name |
||
Line 664:
end
local parameter_check = function(frame, banner_name, project_name)
---------------------------
-- Unknown parameters -----
Line 684:
local initialise = function(args, raw_args, inactive)
local project_name = args.PROJECT_NAME or 'WikiProject ' .. (args.PROJECT or 'PROJECT')
local banner_name = mw.title.new(args.BANNER_NAME or 'Template:WikiProject ' .. (args.PROJECT or 'PROJECT'))
local demo = not yesno(args.category or true, true)
Line 691 ⟶ 692:
)
local invoke = frame.args.PROJECT and frame.args.PROJECT~='' -- checks whether banner template is using {{#invoke:WikiProject banner}}
local unknown_parameters = banner_name.exists and not demo and parameter_check(frame, banner_name, project_name) or ''
if on_template_page then
local templatepage = require('Module:WikiProject banner/templatepage' .. (sandbox or '')).templatepage
|