Module:Contributor/sandbox
Jump to navigation
Jump to search
CodeDiscussionEditHistoryLinksLink count Subpages:DocumentationTestsResultsSandboxLive code All modules
Lua
Documentation for this module may be created at Module:Contributor/sandbox/doc
Code
--[[
This module aims at providing information about a page contributors.
Actually, at least in a first time it only aim at providing the username of the
uploader of a file.
--]]
local api = {}
-- WIP: this assume that frame is a model that is called from some
-- discussion page, whith the first given argument being a pagename
-- TODO: check that assumptions holds or return some useful feedback to correct
-- tho problem
-- TODO: rename the function as `first`, update the template
function api.initial_uploader( frame )
source = frame:getParent().args[1]
page = mw.title.new( source )
-- retrieve the page
-- get the username of the first contributor
return page.isContentPage
end
return api