X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=application%2FFeedBuilder.php;h=1c9812a42376c6281b2205e6297044f07fd70d41;hb=e652ba3670a8481eaabb1f8bf721024107abd1e1;hp=4036a7cccdf3e77fc1a026adc5ddff93c9845fde;hpb=954dc2446caade6ccad3ffd1173ef139c1f36ad3;p=github%2Fshaarli%2FShaarli.git diff --git a/application/FeedBuilder.php b/application/FeedBuilder.php index 4036a7cc..1c9812a4 100644 --- a/application/FeedBuilder.php +++ b/application/FeedBuilder.php @@ -125,7 +125,7 @@ class FeedBuilder $data['show_dates'] = !$this->hideDates || $this->isLoggedIn; // Remove leading slash from REQUEST_URI. $data['self_link'] = escape(server_url($this->serverInfo)) - . escape($this->serverInfo['REQUEST_URI']); + . escape($this->serverInfo['REQUEST_URI']); $data['index_url'] = $pageaddr; $data['usepermalinks'] = $this->usePermalinks === true; $data['links'] = $linkDisplayed; @@ -143,7 +143,7 @@ class FeedBuilder */ protected function buildItem($link, $pageaddr) { - $link['guid'] = $pageaddr .'?'. smallHash($link['linkdate']); + $link['guid'] = $pageaddr .'?'. $link['shorturl']; // Check for both signs of a note: starting with ? and 7 chars long. if ($link['url'][0] === '?' && strlen($link['url']) === 7) { $link['url'] = $pageaddr . $link['url']; @@ -156,12 +156,12 @@ class FeedBuilder $link['description'] = format_description($link['description'], '', $pageaddr); $link['description'] .= PHP_EOL .'
— '. $permalink; - $pubDate = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $link['linkdate']); + $pubDate = $link['created']; $link['pub_iso_date'] = $this->getIsoDate($pubDate); // atom:entry elements MUST contain exactly one atom:updated element. if (!empty($link['updated'])) { - $upDate = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $link['updated']); + $upDate = $link['updated']; $link['up_iso_date'] = $this->getIsoDate($upDate, DateTime::ATOM); } else { $link['up_iso_date'] = $this->getIsoDate($pubDate, DateTime::ATOM);;