diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-11-28 18:24:15 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-12-12 03:03:12 +0100 |
commit | d592daea8343bb4dfecff5d97e93699581ccc58c (patch) | |
tree | d508b902b3aba45795fafe16e0b921ac5ea7c4c4 /application/FeedBuilder.php | |
parent | c3dfd8995921083ff7250c25d0b6ab1184b91aff (diff) | |
download | Shaarli-d592daea8343bb4dfecff5d97e93699581ccc58c.tar.gz Shaarli-d592daea8343bb4dfecff5d97e93699581ccc58c.tar.zst Shaarli-d592daea8343bb4dfecff5d97e93699581ccc58c.zip |
Add a persistent 'shorturl' key to all links
All existing link will keep their permalinks.
New links will have smallhash generated with date+id.
The purpose of this is to avoid collision between links due to their creation date.
Diffstat (limited to 'application/FeedBuilder.php')
-rw-r--r-- | application/FeedBuilder.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/application/FeedBuilder.php b/application/FeedBuilder.php index bfdf2fd3..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['created']->format('Ymd_His')); | 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']; |