diff options
author | Arthur <arthur@hoa.ro> | 2016-12-12 03:15:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-12 03:15:32 +0100 |
commit | 9cf93bcfc53c36e0dd59fcfc717ac483ee74b35a (patch) | |
tree | 505cd68f1d07e0b4d6aedcd49c31368760798c62 /application/FeedBuilder.php | |
parent | a0d079141eb155c263ebfaa1aad2629382223e31 (diff) | |
parent | d592daea8343bb4dfecff5d97e93699581ccc58c (diff) | |
download | Shaarli-9cf93bcfc53c36e0dd59fcfc717ac483ee74b35a.tar.gz Shaarli-9cf93bcfc53c36e0dd59fcfc717ac483ee74b35a.tar.zst Shaarli-9cf93bcfc53c36e0dd59fcfc717ac483ee74b35a.zip |
Merge pull request #697 from ArthurHoaro/feature/ids-bis
Link ID refactoring
Diffstat (limited to 'application/FeedBuilder.php')
-rw-r--r-- | application/FeedBuilder.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/application/FeedBuilder.php b/application/FeedBuilder.php index 4036a7cc..fedd90e6 100644 --- a/application/FeedBuilder.php +++ b/application/FeedBuilder.php | |||
@@ -143,7 +143,7 @@ class FeedBuilder | |||
143 | */ | 143 | */ |
144 | protected function buildItem($link, $pageaddr) | 144 | protected function buildItem($link, $pageaddr) |
145 | { | 145 | { |
146 | $link['guid'] = $pageaddr .'?'. smallHash($link['linkdate']); | 146 | $link['guid'] = $pageaddr .'?'. $link['shorturl']; |
147 | // Check for both signs of a note: starting with ? and 7 chars long. | 147 | // Check for both signs of a note: starting with ? and 7 chars long. |
148 | if ($link['url'][0] === '?' && strlen($link['url']) === 7) { | 148 | if ($link['url'][0] === '?' && strlen($link['url']) === 7) { |
149 | $link['url'] = $pageaddr . $link['url']; | 149 | $link['url'] = $pageaddr . $link['url']; |
@@ -156,12 +156,12 @@ class FeedBuilder | |||
156 | $link['description'] = format_description($link['description'], '', $pageaddr); | 156 | $link['description'] = format_description($link['description'], '', $pageaddr); |
157 | $link['description'] .= PHP_EOL .'<br>— '. $permalink; | 157 | $link['description'] .= PHP_EOL .'<br>— '. $permalink; |
158 | 158 | ||
159 | $pubDate = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $link['linkdate']); | 159 | $pubDate = $link['created']; |
160 | $link['pub_iso_date'] = $this->getIsoDate($pubDate); | 160 | $link['pub_iso_date'] = $this->getIsoDate($pubDate); |
161 | 161 | ||
162 | // atom:entry elements MUST contain exactly one atom:updated element. | 162 | // atom:entry elements MUST contain exactly one atom:updated element. |
163 | if (!empty($link['updated'])) { | 163 | if (!empty($link['updated'])) { |
164 | $upDate = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $link['updated']); | 164 | $upDate = $link['updated']; |
165 | $link['up_iso_date'] = $this->getIsoDate($upDate, DateTime::ATOM); | 165 | $link['up_iso_date'] = $this->getIsoDate($upDate, DateTime::ATOM); |
166 | } else { | 166 | } else { |
167 | $link['up_iso_date'] = $this->getIsoDate($pubDate, DateTime::ATOM);; | 167 | $link['up_iso_date'] = $this->getIsoDate($pubDate, DateTime::ATOM);; |