وحدة:Wikidata2: الفرق بين النسختين

[نسخة منشورة][نسخة منشورة]
تم حذف المحتوى تمت إضافة المحتوى
طلا ملخص تعديل
لا ملخص تعديل
سطر 283:
local claims4 = {}
local add2claims
--mw.log("avoidvalue: " ..local options.avoidvalue)
if(type(options.avoidvalue) == 'string') then avoidvalue = mw.text.split(options.avoidvalue,',')
elseif(type(options.avoidvalue) == 'table') then avoidvalue = options.avoidvalue
else return claims
end
--mw.log("avoidvalue: " .. mw.dumpobject(options.avoidvalue))
for i, j in pairs( claims ) do
--mw.log('t:' .. t)
السطر 289 ⟵ 294:
add2claims = true
if ID then
for k, t in pairs(mw.text.split(options.avoidvalue,',')) do
--mw.log("ID: " .. ID)
if ID == t then
السطر 305 ⟵ 310:
function prefervalue(claims, options)
local claims3 = {}
--mw.log("prefervalue: " .. mw.dumpobject(options.prefervalue))
forlocal k, t in pairs(mw.text.split(options.prefervalue,',')) do
if(type(options.prefervalue) == 'string') then prefervalue = mw.text.split(options.prefervalue,',')
elseif(type(options.prefervalue) == 'table') then prefervalue = options.prefervalue
else return claims
end
for k, t in pairs(prefervalue) do
--mw.log('t:' .. t)
for i, j in pairs( claims ) do