diff options
author | VirtualTam <virtualtam@flibidi.net> | 2019-04-15 23:57:08 +0200 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2019-04-15 23:57:08 +0200 |
commit | 1cc5eaf9dee0e71aefbce1ff0f28c86ff320c053 (patch) | |
tree | c139d7fefc0217b2f18fbb41cb4222879585d3e0 /index.php | |
parent | 0ed9396bfa12f086369b52cdc0742e3fe72273ec (diff) | |
download | Shaarli-1cc5eaf9dee0e71aefbce1ff0f28c86ff320c053.tar.gz Shaarli-1cc5eaf9dee0e71aefbce1ff0f28c86ff320c053.tar.zst Shaarli-1cc5eaf9dee0e71aefbce1ff0f28c86ff320c053.zip |
backport: Fix a warning if links sticky status isn't set
- initiate its status to false when the link is created
- if not defined, initiate its status to false (can happen if the updater hasn't run)
This is a backport of https://github.com/shaarli/Shaarli/pull/1270
Original author information:
commit b790f900c937d0d8f6eccc15d2b4c26023f3d276
Author: ArthurHoaro <arthur@hoa.ro>
Date: Sat Feb 9 14:04:16 2019 +0100
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1179,6 +1179,8 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history, $sessionManager, | |||
1179 | $link['thumbnail'] = $thumbnailer->get($url); | 1179 | $link['thumbnail'] = $thumbnailer->get($url); |
1180 | } | 1180 | } |
1181 | 1181 | ||
1182 | $link['sticky'] = isset($link['sticky']) ? $link['sticky'] : false; | ||
1183 | |||
1182 | $pluginManager->executeHooks('save_link', $link); | 1184 | $pluginManager->executeHooks('save_link', $link); |
1183 | 1185 | ||
1184 | $LINKSDB[$id] = $link; | 1186 | $LINKSDB[$id] = $link; |