8,756
edits
(added pagenamefaviilink) |
mNo edit summary |
||
Line 6: | Line 6: | ||
function p.favilink(frame, searchtype) | function p.favilink(frame, searchtype) | ||
local displayname_tooltip_override = false | local displayname_tooltip_override = false | ||
local args = frame | |||
if frame == mw.getCurrentFrame() then | |||
args = require('Module:ProcessArgs').merge(true) | |||
else | |||
frame = mw.getCurrentFrame() | |||
end | |||
--[Getting query results...] | --[Getting query results...] | ||
Line 14: | Line 20: | ||
searchtype = searchtype or 'PlainName' | searchtype = searchtype or 'PlainName' | ||
if | if args ~= nil and args ~= '' then | ||
if | if args[1] ~= nil and args[1] ~= '' then | ||
name = mw.text.trim(frame:preprocess( | name = mw.text.trim(frame:preprocess(args[1])) | ||
modifier = mw.text.trim(frame:preprocess( | modifier = mw.text.trim(frame:preprocess(args[2])) | ||
else | else | ||
error "There is no argument specified! [[Category:pages with favilink errors]]" | error "There is no argument specified! [[Category:pages with favilink errors]]" |