Modul:Redirect hatnote: Unterschied zwischen den Versionen

(allow passing a custom title object to the p._redirect function)
(check for non-existing data tables)
Zeile 108: Zeile 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.
Zeile 121: Zeile 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