diff options
author | ArthurHoaro <arthur@hoa.ro> | 2019-02-24 11:30:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-24 11:30:35 +0100 |
commit | c21dcc8199ff3bfe8d7eac705d53a45408537c3c (patch) | |
tree | 6e501b3bb243d02aba116eac1d5f498de2f2122e /application/bookmark | |
parent | 015314f3c6a1ce0b2c45fdb2fb0d36a15cab10f5 (diff) | |
parent | b790f900c937d0d8f6eccc15d2b4c26023f3d276 (diff) | |
download | Shaarli-c21dcc8199ff3bfe8d7eac705d53a45408537c3c.tar.gz Shaarli-c21dcc8199ff3bfe8d7eac705d53a45408537c3c.tar.zst Shaarli-c21dcc8199ff3bfe8d7eac705d53a45408537c3c.zip |
Merge pull request #1270 from ArthurHoaro/hotfix/sticky-warning
Fix a warning if links sticky status isn't set
Diffstat (limited to 'application/bookmark')
-rw-r--r-- | application/bookmark/LinkDB.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/application/bookmark/LinkDB.php b/application/bookmark/LinkDB.php index 266632e3..efde8468 100644 --- a/application/bookmark/LinkDB.php +++ b/application/bookmark/LinkDB.php | |||
@@ -252,7 +252,8 @@ You use the community supported version of the original Shaarli project, by Seba | |||
252 | ), | 252 | ), |
253 | 'private' => 0, | 253 | 'private' => 0, |
254 | 'created' => new DateTime(), | 254 | 'created' => new DateTime(), |
255 | 'tags' => 'opensource software' | 255 | 'tags' => 'opensource software', |
256 | 'sticky' => false, | ||
256 | ); | 257 | ); |
257 | $link['shorturl'] = link_small_hash($link['created'], $link['id']); | 258 | $link['shorturl'] = link_small_hash($link['created'], $link['id']); |
258 | $this->links[1] = $link; | 259 | $this->links[1] = $link; |
@@ -265,6 +266,7 @@ You use the community supported version of the original Shaarli project, by Seba | |||
265 | 'private' => 1, | 266 | 'private' => 1, |
266 | 'created' => new DateTime('1 minute ago'), | 267 | 'created' => new DateTime('1 minute ago'), |
267 | 'tags' => 'secretstuff', | 268 | 'tags' => 'secretstuff', |
269 | 'sticky' => false, | ||
268 | ); | 270 | ); |
269 | $link['shorturl'] = link_small_hash($link['created'], $link['id']); | 271 | $link['shorturl'] = link_small_hash($link['created'], $link['id']); |
270 | $this->links[0] = $link; | 272 | $this->links[0] = $link; |
@@ -306,6 +308,8 @@ You use the community supported version of the original Shaarli project, by Seba | |||
306 | 308 | ||
307 | $link['real_url'] = $link['url']; | 309 | $link['real_url'] = $link['url']; |
308 | 310 | ||
311 | $link['sticky'] = isset($link['sticky']) ? $link['sticky'] : false; | ||
312 | |||
309 | // To be able to load links before running the update, and prepare the update | 313 | // To be able to load links before running the update, and prepare the update |
310 | if (!isset($link['created'])) { | 314 | if (!isset($link['created'])) { |
311 | $link['id'] = $link['linkdate']; | 315 | $link['id'] = $link['linkdate']; |