]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/bookmark/LinkDB.php
Fix a warning if links sticky status isn't set
[github/shaarli/Shaarli.git] / application / bookmark / LinkDB.php
index c13a11417b5fb66af9a7df5597ad2f2a09298936..41d5591fe11a5dcfaf3f0ca796e9436fccf47746 100644 (file)
@@ -271,7 +271,8 @@ You use the community supported version of the original Shaarli project, by Seba
             ),
             'private' => 0,
             'created' => new DateTime(),
-            'tags' => 'opensource software'
+            'tags' => 'opensource software',
+            'sticky' => false,
         );
         $link['shorturl'] = link_small_hash($link['created'], $link['id']);
         $this->links[1] = $link;
@@ -284,6 +285,7 @@ You use the community supported version of the original Shaarli project, by Seba
             'private' => 1,
             'created' => new DateTime('1 minute ago'),
             'tags' => 'secretstuff',
+            'sticky' => false,
         );
         $link['shorturl'] = link_small_hash($link['created'], $link['id']);
         $this->links[0] = $link;
@@ -335,6 +337,8 @@ You use the community supported version of the original Shaarli project, by Seba
                 $link['real_url'] = $link['url'];
             }
 
+            $link['sticky'] = isset($link['sticky']) ? $link['sticky'] : false;
+
             // To be able to load links before running the update, and prepare the update
             if (!isset($link['created'])) {
                 $link['id'] = $link['linkdate'];