From 6c8329fb661483b5178f66d293f605ffe1ea35fc Mon Sep 17 00:00:00 2001 From: Mukunda Modell Date: Tue, 5 Dec 2023 06:56:11 -0800 Subject: [PATCH] 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 ``'s source * Apply patch and do the same, see additional `` entry just like the `` * 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 --- .../phame/controller/blog/PhameBlogFeedController.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/applications/phame/controller/blog/PhameBlogFeedController.php b/src/applications/phame/controller/blog/PhameBlogFeedController.php index c0c6e60cc4..1523a8d5e6 100644 --- a/src/applications/phame/controller/blog/PhameBlogFeedController.php +++ b/src/applications/phame/controller/blog/PhameBlogFeedController.php @@ -71,6 +71,11 @@ final class PhameBlogFeedController extends PhameBlogController { '%s', $bloggers[$post->getBloggerPHID()]->getFullName()); + $content[] = phutil_tag( + 'published', + array(), + date('c', $post->getDatePublished())); + $content[] = phutil_tag( 'updated', array(),