X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=index.php;fp=index.php;h=a0a3a8c70648f26098675a21d45387325edda3f3;hb=826c6af7c011234d6e1666a2f7f25744fcf397b7;hp=cc4483524abd9e6dd8bb9dad96d98f764e48f007;hpb=624f999fb75ceeefbc690276f42e5a545ad35357;p=github%2Fshaarli%2FShaarli.git diff --git a/index.php b/index.php index cc448352..a0a3a8c7 100644 --- a/index.php +++ b/index.php @@ -1249,10 +1249,12 @@ function renderPage($conf, $pluginManager) // Edit $created = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $linkdate); $updated = new DateTime(); + $shortUrl = $LINKSDB[$id]['shorturl']; } else { // New link $created = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $linkdate); $updated = null; + $shortUrl = link_small_hash($created, $id); } // Remove multiple spaces. @@ -1279,7 +1281,7 @@ function renderPage($conf, $pluginManager) 'created' => $created, 'updated' => $updated, 'tags' => str_replace(',', ' ', $tags), - 'shorturl' => link_small_hash($created, $id), + 'shorturl' => $shortUrl, ); // If title is empty, use the URL as title.