]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #1270 from ArthurHoaro/hotfix/sticky-warning
authorArthurHoaro <arthur@hoa.ro>
Sun, 24 Feb 2019 10:30:35 +0000 (11:30 +0100)
committerGitHub <noreply@github.com>
Sun, 24 Feb 2019 10:30:35 +0000 (11:30 +0100)
Fix a warning if links sticky status isn't set

1  2 
application/bookmark/LinkDB.php
index.php

index 266632e30da3ed45a0015dbcfc278878809e80e1,41d5591fe11a5dcfaf3f0ca796e9436fccf47746..efde8468fca97e896f1da161e444993bdd711b4d
@@@ -304,8 -325,20 +306,10 @@@ You use the community supported versio
                  $link['tags'] = preg_replace('/(^|\s+)\.[^($|\s)]+\s*/', ' ', $link['tags']);
              }
  
 -            // Do not use the redirector for internal links (Shaarli note URL starting with a '?').
 -            if (!empty($this->redirector) && !startsWith($link['url'], '?')) {
 -                $link['real_url'] = $this->redirector;
 -                if ($this->redirectorEncode) {
 -                    $link['real_url'] .= urlencode(unescape($link['url']));
 -                } else {
 -                    $link['real_url'] .= $link['url'];
 -                }
 -            } else {
 -                $link['real_url'] = $link['url'];
 -            }
 +            $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'];
diff --cc index.php
Simple merge