From: ArthurHoaro Date: Fri, 25 Aug 2017 18:08:07 +0000 (+0200) Subject: Generates a permalinks URL if the URL is set to blank X-Git-Tag: v0.9.4~7^2~11^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=refs%2Fpull%2F940%2Fhead;p=github%2Fshaarli%2FShaarli.git Generates a permalinks URL if the URL is set to blank Fixes #926 --- diff --git a/index.php b/index.php index b4c4347a..23c8d473 100644 --- a/index.php +++ b/index.php @@ -1256,6 +1256,9 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history) // Remove duplicates. $tags = implode(' ', array_unique(explode(' ', $tags))); + if (empty(trim($_POST['lf_url']))) { + $_POST['lf_url'] = '?' . smallHash($linkdate . $id); + } $url = whitelist_protocols(trim($_POST['lf_url']), $conf->get('security.allowed_protocols')); $link = array(