Anonymous user
Module:Navbar: Difference between revisions
handle expensive parser function limit without killing the box
m (Changed protection level of Module:Navbar: Highly visible template or Lua module ([Edit=Block all non-admin users] (indefinite) [Move=Block all non-admin users] (indefinite))) |
(handle expensive parser function limit without killing the box) |
||
Line 17:
return tostring(span)
end
function getTitle( pageName )
pageName = trim( pageName );
else
return mw.title.new( pageName, 'Template' );
end ▼
end
Line 24 ⟶ 33:
end
local good, title;
if
return error('Expensive parser function limit exceeded');
▲ title = mw.title.new( mw.ustring.sub(pageName, 2) );
▲ title = mw.title.new( pageName, 'Template' );
▲ end
if not title then
return error('Page does not exist')
|