liquid_feedback_frontend
diff app/main/member/avatar.lua @ 2:5c601807d397
Version alpha3
Dark green part of issue supporter bargraph represents all satisfied supporters, regardless of having seen the latest draft
Wiki formatting for drafts
Showing differences between two drafts of the same initiative
Display of outgoing delegation chains
Many other improvements
Dark green part of issue supporter bargraph represents all satisfied supporters, regardless of having seen the latest draft
Wiki formatting for drafts
Showing differences between two drafts of the same initiative
Display of outgoing delegation chains
Many other improvements
author | bsw |
---|---|
date | Mon Nov 23 12:00:00 2009 +0100 (2009-11-23) |
parents | 3bfb2fcf7ab9 |
children |
line diff
1.1 --- a/app/main/member/avatar.lua Wed Nov 18 12:00:00 2009 +0100 1.2 +++ b/app/main/member/avatar.lua Mon Nov 23 12:00:00 2009 +0100 1.3 @@ -1,14 +1,14 @@ 1.4 -local record = Member:by_id(param.get_id()) 1.5 +local record = MemberImage:by_pk(param.get_id(), "avatar", true) 1.6 1.7 -if false and (not record or not record.avatar) then 1.8 - print('Location: ' .. encode.url{ static = 'no_image.png' } .. '\n\n') 1.9 +if record == nil then 1.10 + print('Location: ' .. encode.url{ static = 'avatar.jpg' } .. '\n\n') 1.11 exit() 1.12 end 1.13 1.14 -print('Content-type: image/jpg\n') 1.15 +print('Content-type: ' .. record.content_type .. '\n') 1.16 1.17 if record then 1.18 - io.stdout:write(record.avatar) 1.19 + io.stdout:write(record.data) 1.20 else 1.21 end 1.22