Generates a permalinks URL if the URL is set to blank

Fixes #926
This commit is contained in:
ArthurHoaro 2017-08-25 20:08:07 +02:00
parent 2a1292359b
commit c27f2f36f2

View file

@ -1256,6 +1256,9 @@ function renderPage($conf, $pluginManager, $LINKSDB, $history)
// Remove duplicates. // Remove duplicates.
$tags = implode(' ', array_unique(explode(' ', $tags))); $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')); $url = whitelist_protocols(trim($_POST['lf_url']), $conf->get('security.allowed_protocols'));
$link = array( $link = array(