1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 16:22:43 +01:00

Include 'published' date of posts in Phame Atom feeds

Summary:
Metadata of Phame blog posts includes the 'updated' date of a blog post. Make them also include the original 'published' date.

Patch written by @20after4 from:

https://phabricator.wikimedia.org/rPHAB3de500bfc845759d6da82180df0adfc12f973463

Closes T15686

Test Plan:
* Go to the Atom feed of blog 1 at `/phame/blog/feed/1/` and look at this `<feed>`'s source
* Apply patch and do the same, see additional `<published>` entry just like the `<updated>`
* Edit the last blog post in blog 1, then check Atom feed and verify that the published and updated date stamp differ as expected

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, 20after4, Cigaryno

Maniphest Tasks: T15686

Differential Revision: https://we.phorge.it/D25490
This commit is contained in:
Mukunda Modell 2023-12-05 06:56:11 -08:00 committed by Andre Klapper
parent 5ddca7da55
commit 6c8329fb66

View file

@ -71,6 +71,11 @@ final class PhameBlogFeedController extends PhameBlogController {
'<author><name>%s</name></author>',
$bloggers[$post->getBloggerPHID()]->getFullName());
$content[] = phutil_tag(
'published',
array(),
date('c', $post->getDatePublished()));
$content[] = phutil_tag(
'updated',
array(),