Jump to content

Module:Other uses of

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Nihiltres (talk | contribs) at 19:15, 6 April 2016 (Better outcome for edge case). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local mOtheruses = require('Module:Other uses')
local p = {}
p.otherusesof = function (frame)
	function notBlank (blarg) return blarg ~= '' and blarg end
	local ofWhat = notBlank(frame:getParent().args[1]) or mw.title.getCurrentTitle().text
	local page = notBlank(frame:getParent().args[2])
	local options = {}
	options.title = ofWhat
	options.otherText = 'uses of "' .. ofWhat .. '"'
	if page then arg = {page} else arg = {} end
	return mOtheruses._otheruses(arg, options)
end
return p