Added better id in feed item.
In node recent changes, return only the published entries.
This commit is contained in:
@@ -23,6 +23,9 @@ feature {NONE} -- Initialization
|
||||
|
||||
feature -- Access
|
||||
|
||||
id: detachable READABLE_STRING_32
|
||||
-- Optional id, expected to be unique.
|
||||
|
||||
link: CMS_LOCAL_LINK
|
||||
-- Local link associated with the resource.
|
||||
|
||||
@@ -51,6 +54,16 @@ feature -- Access
|
||||
|
||||
feature -- Element change
|
||||
|
||||
set_id (a_id: detachable READABLE_STRING_GENERAL)
|
||||
-- Set `id` to `a_id`.
|
||||
do
|
||||
if a_id = Void then
|
||||
id := Void
|
||||
else
|
||||
id := a_id.as_string_32
|
||||
end
|
||||
end
|
||||
|
||||
set_author_name (n: like author_name)
|
||||
-- Set `author_name' to `n'.
|
||||
do
|
||||
|
||||
@@ -132,6 +132,7 @@ feature -- Hook
|
||||
create l_feed_name.make_from_string (a_response.api.setup.site_name)
|
||||
l_feed_name.append_string ({STRING_32} " : recent changes")
|
||||
create l_feed.make (l_feed_name)
|
||||
l_feed.set_id (a_response.api.absolute_url (a_response.request.path_info, Void))
|
||||
l_feed.set_date (create {DATE_TIME}.make_now_utc)
|
||||
nb := a_size
|
||||
across
|
||||
@@ -143,6 +144,10 @@ feature -- Hook
|
||||
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
|
||||
|
||||
create s.make_empty
|
||||
if attached ch.information as l_information then
|
||||
s.append_string_general (l_information)
|
||||
|
||||
Reference in New Issue
Block a user