Модуль:Meals Lookup: различия между версиями

heatrecipes images
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( "File:" .. fileid .. ".gif" )
     local gifFileTitle = mw.title.new(fileid .. ".gif", "File")
     local pngFileTitle = mw.title.new( "File:" .. fileid .. ".png" )
     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"