From c27f2f36f228240d50b55d36fe97f0ba7833bc77 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Fri, 25 Aug 2017 20:08:07 +0200 Subject: [PATCH] Generates a permalinks URL if the URL is set to blank Fixes #926 --- index.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.php b/index.php index b4c4347..23c8d47 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(