From: nodiscc Date: Mon, 20 Oct 2014 17:14:52 +0000 (+0200) Subject: add link: in case of empty URL (self-post), prepend "Note: " to the title X-Git-Tag: v0.0.43beta~37^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=27646ca5b41bdf09bd73c0e05c352379214b0011;p=github%2Fshaarli%2FShaarli.git add link: in case of empty URL (self-post), prepend "Note: " to the title * Thanks to qwertygc (https://github.com/shaarli/Shaarli/pull/23) * Fix small typo --- diff --git a/index.php b/index.php index 294600d0..01872f4d 100644 --- a/index.php +++ b/index.php @@ -1587,7 +1587,11 @@ function renderPage() } } } - if ($url=='') $url='?'.smallHash($linkdate); // In case of empty URL, this is just a text (with a link that point to itself) + if ($url=='') // In case of empty URL, this is just a text (with a link that points to itself) + { + $url='?'.smallHash($linkdate); + $title='Note: '; + } $link = array('linkdate'=>$linkdate,'title'=>$title,'url'=>$url,'description'=>$description,'tags'=>$tags,'private'=>$private); }