Module:Redirect: Difference between revisions

no edit summary
(Should be the whole thing. Plus a few crawly passengers...)
 
No edit summary
Line 7: Line 7:
   parent=frame.getParent(frame)
   parent=frame.getParent(frame)
   if parent then pargs = parent.args else pargs={} end
   if parent then pargs = parent.args else pargs={} end
   rname=args[1] or pargs[1] or ""
   local rname=args[1] or pargs[1] or ""
   if redirect=="" then return "" end
   if redirect=="" then return "" end
   rpage=mw.title.new(frame,rname)
   local rpage=mw.title.new(frame,rname)
   local err=""
   local err=""
   if rpage then -- avoid possibly expensive FileExists if we don't have anything
   if rpage then -- avoid possibly expensive FileExists if we don't have anything
Anonymous user