summaryrefslogtreecommitdiff
path: root/classes/handler
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2022-08-16 20:02:28 +0300
committerAndrew Dolgov <[email protected]>2022-08-16 20:02:28 +0300
commitec764f97e7e3e0fac20f93364c84dfa01651bf95 (patch)
tree5ec399d2648c5927e3ec8c3aaed606f28401034f /classes/handler
parent7d77edd1fbce51b89b83c2203d1aae98333a3bed (diff)
generate_syndicated_feed: add source section to JSON-formatted output
Diffstat (limited to 'classes/handler')
-rwxr-xr-xclasses/handler/public.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/classes/handler/public.php b/classes/handler/public.php
index e1486e753..3db71520d 100755
--- a/classes/handler/public.php
+++ b/classes/handler/public.php
@@ -219,6 +219,11 @@ class Handler_Public extends Handler {
if (!empty($line['note'])) $article['note'] = $line['note'];
if (!empty($line['author'])) $article['author'] = $line['author'];
+ $article['source'] = [
+ 'link' => $line['site_url'] ? $line["site_url"] : Config::get_self_url(),
+ 'title' => $line['feed_title'] ?? $feed_title
+ ];
+
if (count($line["tags"]) > 0) {
$article['tags'] = array();