Модуль:Сущность: различия между версиями

Нет описания правки
Нет описания правки
Строка 104: Строка 104:
     local function makeCall(id, obj)
     local function makeCall(id, obj)
         if type(id) ~= "string" then return end
         if type(id) ~= "string" then return end
         local parts = { "<nowiki>{{" .. tplPath, "id=" .. id }
 
         local parts = { "{{" .. tplPath, "id=" .. id }
 
         if type(obj) == "table" then
         if type(obj) == "table" then
             if okDp and dp and type(dp.flattenParams) == "function" then
             if okDp and dp and type(dp.flattenParams) == "function" then
Строка 118: Строка 120:
                 end
                 end
             end
             end
        elseif obj ~= nil then
            parts[#parts + 1] = "value=" .. tostring(obj)
         end
         end
         parts[#parts + 1] = "}}</nowiki>"
 
         parts[#parts + 1] = "}}"
         calls[#calls + 1] = table.concat(parts, "|")
         calls[#calls + 1] = table.concat(parts, "|")
     end
     end