Improved node feed and recent changes feed by setting proper feed id and feed item id, and set expected author name.
This commit is contained in:
@@ -329,7 +329,11 @@ feature -- Hooks
|
||||
end
|
||||
end
|
||||
ch.set_information (l_info)
|
||||
ch.set_author (n.editor)
|
||||
if n.editor = Void then
|
||||
ch.set_author (n.author)
|
||||
else
|
||||
ch.set_author (n.editor)
|
||||
end
|
||||
ch.set_summary (n.summary)
|
||||
if attached {CMS_TAXONOMY_API} l_node_api.cms_api.module_api ({CMS_TAXONOMY_MODULE}) as l_taxonomy_api then
|
||||
if attached l_taxonomy_api.terms_of_content (n, Void) as l_terms then
|
||||
|
||||
@@ -86,6 +86,7 @@ feature -- HTTP Methods
|
||||
l_feed_name.append_string ({STRING_32} " : ")
|
||||
l_feed_name.append_string_general (a_content_type.name)
|
||||
create l_feed.make (l_feed_name)
|
||||
l_feed.set_id (api.absolute_url (req.path_info, Void))
|
||||
l_feed.set_date (create {DATE_TIME}.make_now_utc)
|
||||
|
||||
if attached {WSF_STRING} req.query_parameter ("size") as p_size and then p_size.is_integer then
|
||||
@@ -113,9 +114,10 @@ feature -- HTTP Methods
|
||||
if n.is_published then
|
||||
create l_feed_item.make (n.title)
|
||||
if attached n.author as u then
|
||||
l_feed_item.set_author (create {FEED_AUTHOR}.make (api.user_api.user_display_name (u)))
|
||||
l_feed_item.set_author (create {FEED_AUTHOR}.make (api.user_api.real_user_display_name (u)))
|
||||
end
|
||||
l_feed_item.set_date (n.publication_date)
|
||||
l_feed_item.set_id (n.content_type + ":id" + n.id.out + "-rev" + n.revision.out)
|
||||
create lnk.make (req.absolute_script_url ("/" + node_api.node_link (n).location))
|
||||
l_feed_item.links.force (lnk, "")
|
||||
if attached n.summary as l_summary and then not l_summary.is_whitespace then
|
||||
|
||||
@@ -143,10 +143,12 @@ feature -- Hook
|
||||
ch := ic.item
|
||||
create l_feed_item.make (ch.link.title)
|
||||
l_feed_item.set_date (ch.date)
|
||||
|
||||
if attached ch.id as l_ch_id then
|
||||
l_feed_item.set_id (l_ch_id)
|
||||
end
|
||||
if attached ch.author as l_author then
|
||||
l_feed_item.set_author (create {FEED_AUTHOR}.make (a_response.api.real_user_display_name (l_author)))
|
||||
end
|
||||
|
||||
create s.make_empty
|
||||
if attached ch.information as l_information then
|
||||
|
||||
Reference in New Issue
Block a user