Warning: proc_open(): open_basedir restriction in effect. File(/dev/null) is not within the allowed path(s): (/home/moldova/.composer:/home/moldova/web/enciclopedia.md/public_html:/home/moldova/web/enciclopedia.md/private:/home/moldova/web/enciclopedia.md/public_shtml:/home/moldova/tmp:/tmp:/var/www/html:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt) in /home/moldova/web/enciclopedia.md/public_html/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 159

Warning: proc_open(/dev/null): Failed to open stream: Operation not permitted in /home/moldova/web/enciclopedia.md/public_html/extensions/Scribunto/includes/Engines/LuaStandalone/LuaStandaloneInterpreter.php on line 159
Modul:WikidataUtils/Biography - MediaWiki

Modul:WikidataUtils/Biography

Documentația acestui modul poate fi creată la Modul:WikidataUtils/Biography/doc

Eroare în script: Lua error: Cannot create process: proc_open(/dev/null): Failed to open stream: Operation not permitted

local Wikidata = require('Modul:Wikidata')
local p = {}

local function isDead(qId) 
	local deathDateClaims = Wikidata.findBestClaimsForProperty(qId, 'P570')
	if deathDateClaims then for _,eachDeathDateClaim in ipairs(deathDateClaims) do
		if Wikidata.isClaimTrue(eachDeathDateClaim) and eachDeathDateClaim.mainsnak.snaktype ~= 'novalue'
			then
				return true
			end
	end end
	return false
end
p.isDead = isDead

local function isFemale(qId)
	local genders = Wikidata.findBestClaimsForProperty(qId, 'P21')
	local feminineIds = { 6581072, 1052281, 43445 }
	
	if genders then for genderIdx,eachGender in ipairs(genders) do
		if Wikidata.hasValueSnak(eachGender) and Wikidata.isClaimTrue(eachGender) then for _,eachFemId in ipairs(feminineIds) do
			if eachFemId == eachGender.mainsnak.datavalue.value['numeric-id'] then return true end
		end end
	end end
	return false
end
p.isFemale = isFemale
return p