Module:Redirect: Difference between revisions
restoring
No edit summary |
(restoring) |
||
Line 11: | Line 11: | ||
local rpage=mw.title.new(rname) | local rpage=mw.title.new(rname) | ||
local err="" | local err="" | ||
if rpage then -- avoid possibly expensive FileExists if we don't have anything | |||
if rpage.id ~= 0 then | if rpage.id ~= 0 then | ||
-- if rpage.fileExists then | -- if rpage.fileExists then | ||
Line 22: | Line 22: | ||
else err="File not found (id=0): " | else err="File not found (id=0): " | ||
end | end | ||
else err="File not found (mw.title.new failed)" | |||
end | |||
return [=[<span style="text-color:red;">[[Module:redirect]] error: ]=] .. err .. [=[ - [[]=] .. rname .. [=[]]</span>]=] | return [=[<span style="text-color:red;">[[Module:redirect]] error: ]=] .. err .. [=[ - [[]=] .. rname .. [=[]]</span>]=] | ||
end | end | ||
return p | return p |