liquid_feedback_frontend
view app/main/member_image/show.lua @ 113:e0b091e2a0f3
setting <title> tag. fallback: take class="title"-contents
| author | jorges | 
|---|---|
| date | Mon Sep 20 01:18:03 2010 +0200 (2010-09-20) | 
| parents | 88ac7798b562 | 
| children | 034f96181e59 | 
 line source
     1 local image_type = param.get("image_type")
     2 local record = MemberImage:by_pk(param.get_id(), image_type, true)
     4 if record == nil then
     5   local default_file = config.member_image_default_file[image_type]
     6   if default_file then
     7     print('Location: ' .. encode.url{ static = default_file } .. '\n\n')
     8   else
     9     print('Location: ' .. encode.url{ static = 'icons/16/lightning.png' } .. '\n\n')
    10   end
    11   exit()
    12 end
    14 assert(record.content_type, "No content-type set for image.")
    16 slot.set_layout(nil, record.content_type)
    18 if record then
    19   slot.put_into("data", record.data)
    20 end
