Модуль:Сущность: различия между версиями
Pok (обсуждение | вклад) Нет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
| Строка 69: | Строка 69: | ||
local function buildCardCall(merged, entityId) | local function buildCardCall(merged, entityId) | ||
local parts = {} | local parts = {} | ||
-- типы (cardTag) | -- типы (cardTag) | ||
| Строка 111: | Строка 106: | ||
parts[#parts + 1] = mw.text.encode(compositeKey) .. "=" .. content | parts[#parts + 1] = mw.text.encode(compositeKey) .. "=" .. content | ||
end | end | ||
end | |||
-- id сущности | |||
if entityId and entityId ~= "" and #parts > 0 then | |||
table.insert(parts, 1, "id=" .. mw.text.encode(entityId)) | |||
end | end | ||
| Строка 167: | Строка 167: | ||
table.insert(cur, compositeKey) | table.insert(cur, compositeKey) | ||
merged.labelLists[section] = cur | merged.labelLists[section] = cur | ||
end | |||
end | |||
if e.cardTag and e.cardTag ~= "" then | |||
if not merged.tagSet[e.cardTag] then | |||
merged.tagSet[e.cardTag] = true | |||
table.insert(merged.tags, e.cardTag) | |||
end | end | ||
end | end | ||