note description: "Summary description for {CMS_ADMIN_MAILS_HANDLER}." date: "$Date$" revision: "$Revision$" class CMS_ADMIN_MAILS_HANDLER inherit CMS_HANDLER WSF_URI_TEMPLATE_HANDLER create make feature -- Execution execute (req: WSF_REQUEST; res: WSF_RESPONSE) -- Execute request handler local r: like new_generic_response l_to_user: CMS_USER l_offset, l_count, i: INTEGER s: STRING do if req.is_get_request_method then if api.has_permission ({CMS_ADMIN_MODULE_ADMINISTRATION}.perm_view_mails) then r := new_generic_response (req, res) if attached {WSF_STRING} req.query_parameter ("offset") as p_offset then l_offset := p_offset.integer_value end if attached {WSF_STRING} req.query_parameter ("count") as p_count then l_count := p_count.integer_value else l_count := 25 end create s.make_empty if attached {WSF_STRING} req.path_parameter ("uid") as l_to_user_id then l_to_user := api.user_api.user_by_id_or_name (l_to_user_id.value) end if l_to_user /= Void then r.set_title ({STRING_32} "Mails sent to user " + api.real_user_display_name (l_to_user)) else r.set_title ("Mails ...") end r.add_to_primary_tabs (api.administration_link ("Administration", "")) if attached api.storage.mails_to (l_to_user, l_offset, l_count) as l_mails then i := l_offset s.append ("