aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/FeedBuilder.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-11-28 16:16:44 +0100
committerArthurHoaro <arthur@hoa.ro>2016-12-12 03:03:12 +0100
commit01878a75b93b9966f7366ea2937c118bbc3e459e (patch)
tree92286b70b4dd67a1bbd8d030fac6c0a70f64ded0 /application/FeedBuilder.php
parent1dc37f9cf8397e6050c4d5d981da263e6333a849 (diff)
downloadShaarli-01878a75b93b9966f7366ea2937c118bbc3e459e.tar.gz
Shaarli-01878a75b93b9966f7366ea2937c118bbc3e459e.tar.zst
Shaarli-01878a75b93b9966f7366ea2937c118bbc3e459e.zip
Apply the new ID system accros the whole codebase
Diffstat (limited to 'application/FeedBuilder.php')
-rw-r--r--application/FeedBuilder.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/application/FeedBuilder.php b/application/FeedBuilder.php
index 4036a7cc..bfdf2fd3 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 .'?'. smallHash($link['created']->format('Ymd_His'));
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>&#8212; '. $permalink; 157 $link['description'] .= PHP_EOL .'<br>&#8212; '. $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);;