Changes

Jump to: navigation, search

Module:Documentation

129 bytes added, 23:30, 12 January 2014
make all the helper functions available in the p table
----------------------------------------------------------------------------
-- Helper functions
--
-- These are defined as local functions, but are made available in the p
-- table for testing purposes.
----------------------------------------------------------------------------
end
p.message = message -- Make this function available for testing.
local function makeWikilink(page, display)
end
end
 
p.makeWikilink = makeWikilink
local function makeCategoryLink(cat, sort)
local catns = mw.site.namespaces[14].name
return makeWikilink(catns .. '/:' .. cat, sort)
end
 
p.makeCategoryLink = makeCategoryLink
local function makeUrlLink(url, display)
return mw.ustring.format('[%s %s]', url, display)
end
 
p.makeUrlLink = makeUrlLink
local function makeToolbar(...)
end
p.makeToolbar = makeToolbar -- Make this function available for testing.
local function err(msg)
)
end
 
p.err = err
----------------------------------------------------------------------------
Anonymous user

Navigation menu