Content deleted Content added
alphabetize "default image" tracking category |
Avoid Lua error when out of expensive parser function calls |
||
Line 109:
s = mw.ustring.lower(s)
return matchImagePage(s) or matchImagePage(getAlias(s)) or defaultImage
end
local function exists(title)
local success, exists = pcall(function() return title.exists end)
-- If success = false, then we're out of expensive parser function calls and can't check whether it exists
-- in that case, don't throw a Lua error
return not success or exists
end
Line 154 ⟶ 160:
local portalTitle = mw.title.new(portal,"Portal")
-- if portal exists, put it into list
if portalTitle and
table.insert(existingPortals,portal)
-- otherwise set tracking cat
|