<?php
/**
- * Shaarli v0.8.1 - Shaare your links...
+ * Shaarli v0.8.6 - Shaare your links...
*
* The personal, minimalist, super-fast, database free, bookmarking service.
*
/*
* PHP configuration
*/
-define('shaarli_version', '0.8.1');
+define('shaarli_version', '0.8.6');
// http://server.com/x/shaarli --> /shaarli/
define('WEB_PATH', substr($_SERVER['REQUEST_URI'], 0, 1+strrpos($_SERVER['REQUEST_URI'], '/', 0)));
else
{
ban_loginFailed($conf);
- $redir = '&username='. $_POST['login'];
+ $redir = '&username='. urlencode($_POST['login']);
if (isset($_GET['post'])) {
$redir .= '&post=' . urlencode($_GET['post']);
foreach (array('description', 'source', 'title') as $param) {
// 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.
'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.