Module:Redirect template: Difference between revisions

From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Grandparent parameters cannot be obtained, so get the passed parameter
(Undid revision 631146884 by Petr Matas (talk): This doesn't work at all, and nothing like it can work)
(Grandparent parameters cannot be obtained, so get the passed parameter)
Line 44:
local namespace = mw.title.getCurrentTitle().namespace
local otherCategory = args['other category'] and (args.category or string.format('[[Category:%s]]', args['other category']))
local embedPossible = (frame.args.embed or frame:getParent().args.embed or 'yes') == 'yes'
 
--- XXX: this is a HORRIBLE HACK. kill it with fire as soon as https://bugzilla.wikimedia.org/show_bug.cgi?id=12974 is fixed
local beCompatibleWithBug12974 = args.info and (args.info:find('^[:;#*]', 1) == 1 or args.info:find('{|', 1, true) == 1) and '\n' or ' '
local retval = string.format('*%sThis is a redirect%s%s.%s%s\n',
embedPossible and args.name and getPrettyName(args) or '',
args.from and (' from ' .. args.from) or '',
args.to and (' to ' .. args.to) or '',
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu