Модуль:Meals Lookup: различия между версиями
Mhamster (обсуждение | вклад) heatrecipes images |
Mhamster (обсуждение | вклад) non-expensive getimage |
||
| Строка 31: | Строка 31: | ||
function getimage(frame, fileid) -- should not be invoked | function getimage(frame, fileid) -- should not be invoked | ||
local out = "" | local out = "" | ||
local gifFileTitle = mw.title.new( | local gifFileTitle = mw.title.new(fileid .. ".gif", "File") | ||
local pngFileTitle = mw.title.new( | local pngFileTitle = mw.title.new(fileid .. ".png", "File") | ||
if gifFileTitle.file.exists then | if gifFileTitle.file.exists then | ||
out = "File:" .. fileid .. ".gif" | out = "File:" .. fileid .. ".gif" | ||