Module:Utilities: Difference between revisionsGive feedback
m no px provided not working |
Tag: Undo |
||
| Line 23: | Line 23: | ||
-- If the image exists exists, return it back enclosed in brackets, else return a blank string | -- If the image exists exists, return it back enclosed in brackets, else return a blank string | ||
function p.get_image_file(image_file_name, px) | function p.get_image_file(image_file_name, px) | ||
if (px == nil) then px = 15 end --default | |||
image_file = mw.title.new(image_file_name) | image_file = mw.title.new(image_file_name) | ||
if image_file and image_file.exists then | if image_file and image_file.exists then | ||