bsw@11: local id = param.get("id", atom.number) bsw@11: bsw@11: local setting_key = "liquidfeedback_frontend_timeline_current_options" bsw@11: local setting = Setting:by_pk(app.session.member.id, setting_key) bsw@11: local options_string = setting.value bsw@11: bsw@11: local timeline_filter bsw@11: bsw@11: local subkey = param.get("name") bsw@11: poelzi@144: if not subkey or subkey == "" then poelzi@144: slot.put_into("error", _"This name is really too short!") poelzi@144: request.redirect{ poelzi@144: module = "timeline", poelzi@144: view = "save_filter", poelzi@144: } poelzi@144: return poelzi@144: end poelzi@144: poelzi@144: app.session.member:set_setting_map("timeline_filters", subkey, options_string) bsw@11: bsw@11: local timeline_params = {} bsw@11: if options_string then bsw@11: for event_ident, filter_idents in setting.value:gmatch("(%S+):(%S+)") do bsw@11: timeline_params["option_" .. event_ident] = true bsw@11: if filter_idents ~= "*" then bsw@11: for filter_ident in filter_idents:gmatch("([^\|]+)") do bsw@11: timeline_params["option_" .. event_ident .. "_" .. filter_ident] = true bsw@11: end bsw@11: end bsw@11: end bsw@11: end bsw@11: bsw@11: local setting_key = "liquidfeedback_frontend_timeline_current_date" bsw@11: local setting = Setting:by_pk(app.session.member.id, setting_key) bsw@11: bsw@11: if setting then bsw@11: timeline_params.date = setting.value bsw@11: end bsw@11: bsw@11: request.redirect{ bsw@11: module = "timeline", bsw@11: view = "index", bsw@11: params = timeline_params bsw@11: }