aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-08-25 20:08:07 +0200
committerArthurHoaro <arthur@hoa.ro>2017-08-25 20:08:07 +0200
commitc27f2f36f228240d50b55d36fe97f0ba7833bc77 (patch)
treec1b7e5797c8d17e9f9798de556fbbc8c6fde09f5 /index.php
parent2a1292359b79ec77257583ea9d97891dfd2ddb1b (diff)
downloadShaarli-c27f2f36f228240d50b55d36fe97f0ba7833bc77.tar.gz
Shaarli-c27f2f36f228240d50b55d36fe97f0ba7833bc77.tar.zst
Shaarli-c27f2f36f228240d50b55d36fe97f0ba7833bc77.zip
Generates a permalinks URL if the URL is set to blank
Fixes #926
Diffstat (limited to 'index.php')
-rw-r--r--index.php3
1 files changed, 3 insertions, 0 deletions
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)
1256 // Remove duplicates. 1256 // Remove duplicates.
1257 $tags = implode(' ', array_unique(explode(' ', $tags))); 1257 $tags = implode(' ', array_unique(explode(' ', $tags)));
1258 1258
1259 if (empty(trim($_POST['lf_url']))) {
1260 $_POST['lf_url'] = '?' . smallHash($linkdate . $id);
1261 }
1259 $url = whitelist_protocols(trim($_POST['lf_url']), $conf->get('security.allowed_protocols')); 1262 $url = whitelist_protocols(trim($_POST['lf_url']), $conf->get('security.allowed_protocols'));
1260 1263
1261 $link = array( 1264 $link = array(