"मोड्युल:Redirect" को बिचमी भिन्नता

Content deleted Content added
imported>Jackmcbarn
add p.getTargetFromText
imported>SiBr4
Moved from sandbox: making the isRedirect function available from other modules, like the main function is
पंक्ति ९५:
end
 
-- Returns "yes"true if the specified page is a redirect, and the blankfalse stringotherwise.
function p.isRedirectluaIsRedirect(framepage)
-- otherwise.
local titleObj = getTitle(args[1]page)
function p.isRedirect(frame)
local args = require('Module:Arguments').getArgs(frame, {frameOnly = true})
local titleObj = getTitle(args[1])
if not titleObj then
return ''false
end
if titleObj.isRedirect then
return true
else
return false
end
end
 
-- Provides access to the luaIsRedirect function from wikitext, returning 'yes'
-- if the specified page is a redirect, and the blank string otherwise.
function p.isRedirect(frame)
local args = require('Module:Arguments').getArgs(frame, {frameOnly = true})
if p.luaIsRedirect(args[1]) then
return 'yes'
else
"https://dty.wikipedia.org/wiki/मोड्युल:Redirect" बठे निकालियाऽ