diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,6 +1,6 @@ | |||
1 | <?php | 1 | <?php |
2 | /** | 2 | /** |
3 | * Shaarli v0.8.1 - Shaare your links... | 3 | * Shaarli v0.8.2 - Shaare your links... |
4 | * | 4 | * |
5 | * The personal, minimalist, super-fast, database free, bookmarking service. | 5 | * The personal, minimalist, super-fast, database free, bookmarking service. |
6 | * | 6 | * |
@@ -25,7 +25,7 @@ if (date_default_timezone_get() == '') { | |||
25 | /* | 25 | /* |
26 | * PHP configuration | 26 | * PHP configuration |
27 | */ | 27 | */ |
28 | define('shaarli_version', '0.8.1'); | 28 | define('shaarli_version', '0.8.2'); |
29 | 29 | ||
30 | // http://server.com/x/shaarli --> /shaarli/ | 30 | // http://server.com/x/shaarli --> /shaarli/ |
31 | define('WEB_PATH', substr($_SERVER['REQUEST_URI'], 0, 1+strrpos($_SERVER['REQUEST_URI'], '/', 0))); | 31 | define('WEB_PATH', substr($_SERVER['REQUEST_URI'], 0, 1+strrpos($_SERVER['REQUEST_URI'], '/', 0))); |
@@ -1249,10 +1249,12 @@ function renderPage($conf, $pluginManager) | |||
1249 | // Edit | 1249 | // Edit |
1250 | $created = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $linkdate); | 1250 | $created = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $linkdate); |
1251 | $updated = new DateTime(); | 1251 | $updated = new DateTime(); |
1252 | $shortUrl = $LINKSDB[$id]['shorturl']; | ||
1252 | } else { | 1253 | } else { |
1253 | // New link | 1254 | // New link |
1254 | $created = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $linkdate); | 1255 | $created = DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, $linkdate); |
1255 | $updated = null; | 1256 | $updated = null; |
1257 | $shortUrl = link_small_hash($created, $id); | ||
1256 | } | 1258 | } |
1257 | 1259 | ||
1258 | // Remove multiple spaces. | 1260 | // Remove multiple spaces. |
@@ -1279,7 +1281,7 @@ function renderPage($conf, $pluginManager) | |||
1279 | 'created' => $created, | 1281 | 'created' => $created, |
1280 | 'updated' => $updated, | 1282 | 'updated' => $updated, |
1281 | 'tags' => str_replace(',', ' ', $tags), | 1283 | 'tags' => str_replace(',', ' ', $tags), |
1282 | 'shorturl' => link_small_hash($created, $id), | 1284 | 'shorturl' => $shortUrl, |
1283 | ); | 1285 | ); |
1284 | 1286 | ||
1285 | // If title is empty, use the URL as title. | 1287 | // If title is empty, use the URL as title. |