Module:Redirect hatnote: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content added Content deleted
(allow passing a custom title object to the p._redirect function)
(check for non-existing data tables)
Line 108: Line 108:
checkType('_redirect', 2, data, 'table', true)
checkType('_redirect', 2, data, 'table', true)
checkType('_redirect', 3, options, 'table', true)
checkType('_redirect', 3, options, 'table', true)
data = data or {}
options = options or {}


-- Generate the text.
-- Generate the text.
Line 121: Line 123:
-- Generate the options to pass to [[Module:Hatnote]].
-- Generate the options to pass to [[Module:Hatnote]].
options = options or {}
local mhOptions = {}
local mhOptions = {}
mhOptions.selfref = options.selfref
mhOptions.selfref = options.selfref