liquid_feedback_frontend
annotate app/main/member/_action/update_notify_level.lua @ 1401:cd9ab9f36375
Changed style of register image upload 11
| author | bsw | 
|---|---|
| date | Mon Aug 13 19:37:57 2018 +0200 (2018-08-13) | 
| parents | b04fa071ba05 | 
| children | 2626155efb83 | 
| rev | line source | 
|---|---|
| bsw@1255 | 1 local disable_notifications = param.get("disable_notifications") == "true" and true or false | 
| bsw@1255 | 2 | 
| bsw@1255 | 3 if app.session.member.disable_notifications ~= disable_notifications then | 
| bsw@1255 | 4 IgnoredArea:destroy_by_member_id(app.session.member_id) | 
| bsw@1255 | 5 app.session.member.disable_notifications = disable_notifications | 
| bsw@1255 | 6 end | 
| bsw@1255 | 7 | 
| bsw@1275 | 8 if app.session.member.disable_notifications then | 
| bsw@1265 | 9 app.session.member.notification_dow = nil | 
| bsw@1265 | 10 app.session.member.notification_hour = nil | 
| bsw@1275 | 11 else | 
| bsw@1275 | 12 if param.get("digest") == "true" then | 
| bsw@1275 | 13 local dow = param.get("notification_dow") | 
| bsw@1275 | 14 if dow == "daily" then | 
| bsw@1275 | 15 app.session.member.notification_dow = nil | 
| bsw@1275 | 16 else | 
| bsw@1275 | 17 app.session.member.notification_dow = tonumber(dow) | 
| bsw@1275 | 18 end | 
| bsw@1275 | 19 app.session.member.notification_hour = tonumber(param.get("notification_hour")) | 
| bsw@1275 | 20 else | 
| bsw@1275 | 21 app.session.member.notification_dow = nil | 
| bsw@1275 | 22 app.session.member.notification_hour = nil | 
| bsw@1275 | 23 end | 
| bsw@1255 | 24 end | 
| bsw@1255 | 25 | 
| bsw@348 | 26 app.session.member:save() |