X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=index.php;h=7d84aa0d858e71eaf07de062b5e262bfc837d150;hb=326ae54d08b787d61e2807ea3ff5dc3171a695de;hp=9ab70f6c32a8d2946308b3c1ff1bff80341f6859;hpb=bec18701801cc140d760c261dd115fda1507a0dd;p=github%2Fshaarli%2FShaarli.git diff --git a/index.php b/index.php index 9ab70f6c..7d84aa0d 100644 --- a/index.php +++ b/index.php @@ -1770,7 +1770,6 @@ HTML; // -------- Otherwise, simply display search form and links: $PAGE = new pageBuilder; - $PAGE->assign('linkcount',count($LINKSDB)); buildLinkList($PAGE,$LINKSDB); // Compute list of links to display $PAGE->renderPage('linklist'); exit; @@ -1938,6 +1937,12 @@ function buildLinkList($PAGE,$LINKSDB) $taglist = explode(' ',$link['tags']); uasort($taglist, 'strcasecmp'); $link['taglist']=$taglist; + + if ($link["url"][0] === '?' && // Check for both signs of a note: starting with ? and 7 chars long. I doubt that you'll post any links that look like this. + strlen($link["url"]) === 7) { + $link["url"] = indexUrl() . $link["url"]; + } + $linkDisp[$keys[$i]] = $link; $i++; }