]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Merge pull request #717 from ArthurHoaro/v0.8 v0.8.2
authorArthur <arthur@hoa.ro>
Thu, 15 Dec 2016 10:58:39 +0000 (11:58 +0100)
committerGitHub <noreply@github.com>
Thu, 15 Dec 2016 10:58:39 +0000 (11:58 +0100)
Preparation of v0.8.2

CHANGELOG.md
index.php
shaarli_version.php

index 21d5436ccdefeae86fe4dc72385b732816e8c324..d3157d5ba93e8bd5b7e9f6269be6975ded95626e 100644 (file)
@@ -13,6 +13,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
 
 ### Fixed
 
+## [v0.8.2](https://github.com/shaarli/Shaarli/releases/tag/v0.8.2) - 2016-12-15
+
+### Fixed
+
+- Editing a link created before the new ID system would change its permalink.
 
 ## [v0.8.1](https://github.com/shaarli/Shaarli/releases/tag/v0.8.1) - 2016-12-12
 
index cc4483524abd9e6dd8bb9dad96d98f764e48f007..62bdffd56363f8fda5d2617f8f0d4e16393736f9 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1,6 +1,6 @@
 <?php
 /**
- * Shaarli v0.8.1 - Shaare your links...
+ * Shaarli v0.8.2 - Shaare your links...
  *
  * The personal, minimalist, super-fast, database free, bookmarking service.
  *
@@ -25,7 +25,7 @@ if (date_default_timezone_get() == '') {
 /*
  * PHP configuration
  */
-define('shaarli_version', '0.8.1');
+define('shaarli_version', '0.8.2');
 
 // http://server.com/x/shaarli --> /shaarli/
 define('WEB_PATH', substr($_SERVER['REQUEST_URI'], 0, 1+strrpos($_SERVER['REQUEST_URI'], '/', 0)));
@@ -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.
index 431387bb75bf236a7696629476a1bf25088b7371..e93b0e7faddefb59af197be1d967edc72b01e369 100644 (file)
@@ -1 +1 @@
-<?php /* 0.8.1 */ ?>
+<?php /* 0.8.2 */ ?>