Module:Portal: Difference between revisions

Content deleted Content added
per tper
use Module:Yesno for added flexibility (TPER)
Line 45:
 
local templatestyles = 'Module:Portal/styles.css'
 
local yesno = require('Module:Yesno')
 
-- Check whether to do tracking in this namespace
Line 142 ⟶ 144:
-- 2/ the current page fails the namespace tests in checkTrackingNamespace()
-- 3/ the current page fails the pagename tests in checkTrackingPagename()
if (args.trackingtrackingEnabled == 'no') or yesno(args.tracking, == 'n'trackingEnabled) or (args.tracking == 'false') then
trackingEnabled = false
end
if (checkTrackingNamespace() == false) then
trackingEnabled = false
Line 154:
-- If no portals have been specified, display an error and add the page to a tracking category.
if not portals[1] then
if yesno(args.nominimum == 'yes') or (args.nominimum == 'y') or (args.nominimum == 'true') then
-- if nominimum as been set to yes (or similar), omit the warning
Line 175:
if not pcall(checkPortalExists, portals[i]) or not checkPortalExists(portals[i]) then
-- Getting here means a redlinked portal has been found
if yesno(args.redlinks == 'yes') or (args.redlinks == 'y') or (args.redlinks == 'true') or (args.redlinks == 'include') then
-- if redlinks as been set to yes (or similar), add the cleanup category and then break the loop before the portal is removed from the list
if (trackingEnabled) then